Re: [PATCH 1/1] r8152: fix NULL pointer dereference in r8152_poll

2017-03-13 Thread Petr Vorel
> > > Unfortunately this doesn't work. Code in r8152.c doesn't use > > > local_bh_enable()/local_bh_disable(). I tried to lock it with > > > spin_lock_bh()/spin_unlock_bh() and with mutex_lock()/mutex_unlock() > > > but neither work. > > The local_bh_disable() / local_bh_enable() definitely is

Re: [PATCH 1/1] r8152: fix NULL pointer dereference in r8152_poll

2017-03-13 Thread Eric Dumazet
On Mon, 2017-03-13 at 08:44 -0700, Eric Dumazet wrote: > On Mon, 2017-03-13 at 16:37 +0100, Petr Vorel wrote: > > Hi Eric, > > > > > > The proper work around is to enclose the napi_schedule() in a > > > > local_bh_enable()/local_bh_disable() pair. > > > > > Something like : > > > ---

Re: [PATCH 1/1] r8152: fix NULL pointer dereference in r8152_poll

2017-03-13 Thread Eric Dumazet
On Mon, 2017-03-13 at 16:37 +0100, Petr Vorel wrote: > Hi Eric, > > > > The proper work around is to enclose the napi_schedule() in a > > > local_bh_enable()/local_bh_disable() pair. > > > Something like : > > --- a/drivers/net/usb/r8152.c > > +++ b/drivers/net/usb/r8152.c > > @@ -3703,8

Re: [PATCH 1/1] r8152: fix NULL pointer dereference in r8152_poll

2017-03-13 Thread Petr Vorel
Hi Eric, > > The proper work around is to enclose the napi_schedule() in a > > local_bh_enable()/local_bh_disable() pair. > Something like : > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c > @@ -3703,8 +3703,10 @@ static int rtl8152_resume(struct usb_interface *intf) >

Re: [PATCH 1/1] r8152: fix NULL pointer dereference in r8152_poll

2017-03-13 Thread Eric Dumazet
On Mon, 2017-03-13 at 06:18 -0700, Eric Dumazet wrote: > On Mon, 2017-03-13 at 13:47 +0100, Petr Vorel wrote: > > commit 7489bdadb7d1 (r8152: check rx after napi is enabled) causes null > > pointer dereference when using device as under root: > > > > # rmmod r8152 # or lsusb -v > > NOHZ:

Re: [PATCH 1/1] r8152: fix NULL pointer dereference in r8152_poll

2017-03-13 Thread Eric Dumazet
On Mon, 2017-03-13 at 13:47 +0100, Petr Vorel wrote: > commit 7489bdadb7d1 (r8152: check rx after napi is enabled) causes null > pointer dereference when using device as under root: > > # rmmod r8152 # or lsusb -v > NOHZ: local_softirq_pending 08 > BUG: unable to handle kernel NULL pointer

[PATCH 1/1] r8152: fix NULL pointer dereference in r8152_poll

2017-03-13 Thread Petr Vorel
commit 7489bdadb7d1 (r8152: check rx after napi is enabled) causes null pointer dereference when using device as under root: # rmmod r8152 # or lsusb -v NOHZ: local_softirq_pending 08 BUG: unable to handle kernel NULL pointer dereference at 0008 IP: r8152_poll+0x125/0x570 [r8152] PGD