Skip to content

Commit 36d2582

Browse files
committed
Input: evdev - add a schedule point in evdev_write()
Large writes to evdev 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 f74c371 commit 36d2582

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/input/evdev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer,
564564

565565
input_inject_event(&evdev->handle,
566566
event.type, event.code, event.value);
567+
cond_resched();
567568
}
568569

569570
out:

0 commit comments

Comments
 (0)