Skip to content

Commit cecf107

Browse files
committed
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. Reviewed-by: Paul E. McKenney <paulmck@linux.ibm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 36d2582 commit cecf107

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/input/misc/uinput.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ static ssize_t uinput_inject_events(struct uinput_device *udev,
598598

599599
input_event(udev->dev, ev.type, ev.code, ev.value);
600600
bytes += input_event_size();
601+
cond_resched();
601602
}
602603

603604
return bytes;

0 commit comments

Comments
 (0)