Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: mousedev - add a schedule point in mousedev_write()

syzbot was able to trigger rcu stalls by calling write()
with large number of bytes.

Add a cond_resched() in the loop to avoid this.

Link: https://lkml.org/lkml/2018/8/23/1106
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot+9436b02171ac0894d33e@syzkaller.appspotmail.com
Reviewed-by: Paul E. McKenney <paulmck@linux.ibm.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Eric Dumazet and committed by
Dmitry Torokhov
f74c371f 684bec10

+1
+1
drivers/input/mousedev.c
··· 707 707 mousedev_generate_response(client, c); 708 708 709 709 spin_unlock_irq(&client->packet_lock); 710 + cond_resched(); 710 711 } 711 712 712 713 kill_fasync(&client->fasync, SIGIO, POLL_IN);