Skip to content

Commit

Permalink
Input: uinput - add a schedule point in uinput_inject_events()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov committed Oct 5, 2018
1 parent 36d2582 commit cecf107
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/misc/uinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cecf107

Please sign in to comment.