Skip to content

Commit

Permalink
Input: evdev - add a schedule point in evdev_write()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov committed Oct 5, 2018
1 parent f74c371 commit 36d2582
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer,

input_inject_event(&evdev->handle,
event.type, event.code, event.value);
cond_resched();
}

out:
Expand Down

0 comments on commit 36d2582

Please sign in to comment.