1
0
Fork 0

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>
hifive-unleashed-5.1
Dmitry Torokhov 2018-10-04 17:50:48 -07:00
parent 36d2582ff2
commit cecf107048
1 changed files with 1 additions and 0 deletions

View File

@ -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;