Re: [PATCH v5 1/2] nbd: Fix NULL pointer in flush_workqueue

2021-02-10 Thread Josef Bacik
On 2/5/21 1:56 AM, Sun Ke wrote: Open /dev/nbdX first, the config_refs will be 1 and the pointers in nbd_device are still null. Disconnect /dev/nbdX, then reference a null recv_workq. The protection by config_refs in nbd_genl_disconnect is useless. [ 656.366194] BUG: kernel NULL pointer derefer

[PATCH v5 1/2] nbd: Fix NULL pointer in flush_workqueue

2021-02-04 Thread Sun Ke
Open /dev/nbdX first, the config_refs will be 1 and the pointers in nbd_device are still null. Disconnect /dev/nbdX, then reference a null recv_workq. The protection by config_refs in nbd_genl_disconnect is useless. [ 656.366194] BUG: kernel NULL pointer dereference, address: 0020 [