Re: [PATCH] Input: mousedev - add a schedule point in mousedev_write()

2018-10-04 Thread Eric Dumazet
On 10/04/2018 03:54 PM, Dmitry Torokhov wrote: > OK, I see. I'll apply the patch then. Thanks ! > > I think evdev.c needs similar treatment as it will keep looping while > there is data... Yeah, presumably other drivers need care as well :/

Re: [PATCH] Input: mousedev - add a schedule point in mousedev_write()

2018-10-04 Thread Dmitry Torokhov
On Thu, Oct 04, 2018 at 12:34:07PM -0700, Paul E. McKenney wrote: > On Thu, Oct 04, 2018 at 11:59:49AM -0700, Dmitry Torokhov wrote: > > Hi Eric, > > > > On Thu, Oct 04, 2018 at 08:47:49AM -0700, Eric Dumazet wrote: > > > syzbot was able to trigger rcu stalls by calling write() > > > with large nu

Re: [PATCH] Input: mousedev - add a schedule point in mousedev_write()

2018-10-04 Thread Eric Dumazet
On Thu, Oct 4, 2018 at 12:38 PM Dmitry Torokhov wrote: > > On October 4, 2018 12:28:56 PM PDT, Eric Dumazet wrote: > >On Thu, Oct 4, 2018 at 11:59 AM Dmitry Torokhov > > wrote: > >> > >> Hi Eric, > >> > >> On Thu, Oct 04, 2018 at 08:47:49AM -0700, Eric Dumazet wrote: > >> > syzbot was able to tri

Re: [PATCH] Input: mousedev - add a schedule point in mousedev_write()

2018-10-04 Thread Dmitry Torokhov
On October 4, 2018 12:28:56 PM PDT, Eric Dumazet wrote: >On Thu, Oct 4, 2018 at 11:59 AM Dmitry Torokhov > wrote: >> >> Hi Eric, >> >> On Thu, Oct 04, 2018 at 08:47:49AM -0700, Eric Dumazet wrote: >> > syzbot was able to trigger rcu stalls by calling write() >> > with large number of bytes. >> > >

Re: [PATCH] Input: mousedev - add a schedule point in mousedev_write()

2018-10-04 Thread Paul E. McKenney
On Thu, Oct 04, 2018 at 12:28:56PM -0700, Eric Dumazet wrote: > On Thu, Oct 4, 2018 at 11:59 AM Dmitry Torokhov > wrote: > > > > Hi Eric, > > > > On Thu, Oct 04, 2018 at 08:47:49AM -0700, Eric Dumazet wrote: > > > syzbot was able to trigger rcu stalls by calling write() > > > with large number of

Re: [PATCH] Input: mousedev - add a schedule point in mousedev_write()

2018-10-04 Thread Paul E. McKenney
On Thu, Oct 04, 2018 at 11:59:49AM -0700, Dmitry Torokhov wrote: > Hi Eric, > > On Thu, Oct 04, 2018 at 08:47:49AM -0700, Eric Dumazet wrote: > > 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. > > I

Re: [PATCH] Input: mousedev - add a schedule point in mousedev_write()

2018-10-04 Thread Eric Dumazet
On Thu, Oct 4, 2018 at 11:59 AM Dmitry Torokhov wrote: > > Hi Eric, > > On Thu, Oct 04, 2018 at 08:47:49AM -0700, Eric Dumazet wrote: > > 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. > > I think thi

Re: [PATCH] Input: mousedev - add a schedule point in mousedev_write()

2018-10-04 Thread Dmitry Torokhov
Hi Eric, On Thu, Oct 04, 2018 at 08:47:49AM -0700, Eric Dumazet wrote: > 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. I think this simply masks a deeper issue. The code fetches characters from userspace

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

2018-10-04 Thread Eric Dumazet
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 Reported-by: syzbot+9436b02171ac0894d...@syzkaller.appspotmail.com Cc: Dmitry Torokhov Cc: