Re: [PATCH] Input: evdev - limit amount of data for writes

From: Dmitry Torokhov
Date: Fri Aug 16 2024 - 02:17:35 EST


On Fri, Aug 16, 2024 at 10:18:05AM +1000, Peter Hutterer wrote:
> On Thu, Aug 15, 2024 at 11:41:53AM -0700, Dmitry Torokhov wrote:
> > Limit amount of data that can be written into an evdev instance at
> > a given time to 4096 bytes (170 input events) to avoid holding
> > evdev->mutex for too long and starving other users.
> >
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
>
> I'd expect anything coming near 170 input events is going to trigger
> SYN_DROPPED anyway, so:

This actually going the other direction (userspace -> kernel) so there
will be no SYN_DROPPED, at least on the way in.

>
> Reviewed-by: Peter Hutterer <peter.hutterer@xxxxxxxxx>

Thanks for the review!

--
Dmitry