Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cecf1070 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

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: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 36d2582f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;