Input: uinput - add a schedule point in uinput_inject_events()
Subsystems (2)
Dmitry Torokhov
maintainerPATCH 1/1 Input: uinput - add a schedule point in uinput_inject_events()
Large writes to uinput interface may cause rcu stalls. Let's add cond_resched() to the loop to avoid this.
Signed-off-by Dmitry Torokhov <[email protected]>
--- drivers/input/misc/uinput.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/misc/uinput.c +1 -0
@@ -598,6 +598,7 @@ static ssize_t uinput_inject_events(struct uinput_device *udev,input_event (udev->dev, ev.type, ev.code, ev.value); bytes +=input_event_size (); +cond_resched (); }return bytes;
Signature · 5 lines
2.19.0.605.g01d371f741-goog -- Dmitry
Quoted 4 lines · Dmitry Torokhov
Large writes to uinput interface may cause rcu stalls. Let's add
cond_resched()to the loop to avoid this.Signed-off-by Dmitry Torokhov <[email protected]>
Reviewed-by Paul E. McKenney <[email protected]>
Quoted 23 lines
--- drivers/input/misc/uinput.c | 1 + 1 file changed, 1 insertion(+)drivers/input/misc/uinput.c +1
-0@@ -598,6 +598,7 @@ static ssize_t uinput_inject_events(struct uinput_device *udev,input_event (udev->dev, ev.type, ev.code, ev.value); bytes +=input_event_size (); +cond_resched (); }return bytes;Signature · 5 lines
2.19.0.605.g01d371f741-goog -- Dmitry