Re: [PATCH 2/2] uio: fix crash after the device is unregistered

2018-07-05 Thread Xiubo Li
On 2018/7/6 4:56, Jann Horn wrote: On Thu, Jul 5, 2018 at 10:53 PM wrote: From: Xiubo Li For the target_core_user use case, after the device is unregistered it maybe still opened in user space, then the kernel will crash, like: [...] Signed-off-by: Xiubo Li --- drivers/uio/uio.c | 101 +

Re: [PATCH 2/2] uio: fix crash after the device is unregistered

2018-07-05 Thread Jann Horn
On Thu, Jul 5, 2018 at 10:53 PM wrote: > > From: Xiubo Li > > For the target_core_user use case, after the device is unregistered > it maybe still opened in user space, then the kernel will crash, like: > [...] > > Signed-off-by: Xiubo Li > --- > drivers/uio/uio.c | 101 > +

[PATCH 2/2] uio: fix crash after the device is unregistered

2018-07-05 Thread xiubli
From: Xiubo Li For the target_core_user use case, after the device is unregistered it maybe still opened in user space, then the kernel will crash, like: [ 251.163692] BUG: unable to handle kernel NULL pointer dereference at 0008 [ 251.163820] IP: [] show_name+0x23/0x40 [uio] [ 2