Re: [PATCH V2] nvme-pci: fix NULL pointer reference in nvme_alloc_ns

2018-01-04 Thread jianchao.wang
Hi Christoph Many thanks for your kindly response. On 01/04/2018 06:20 PM, Christoph Hellwig wrote: > This looks generally fine to me, ut a few nitpicks below: > >> - Based on Sagi's suggestion, add new state NVME_CTRL_ADMIN_LIVE. > > Maybe call this NVME_CTRL_ADMIN_ONLY ? Sound more in line

Re: [PATCH V2] nvme-pci: fix NULL pointer reference in nvme_alloc_ns

2018-01-04 Thread Christoph Hellwig
This looks generally fine to me, ut a few nitpicks below: > - Based on Sagi's suggestion, add new state NVME_CTRL_ADMIN_LIVE. Maybe call this NVME_CTRL_ADMIN_ONLY ? > - if (ctrl->state != NVME_CTRL_LIVE) > + if ((ctrl->state != NVME_CTRL_LIVE) && > + (ctrl->state != NVME_CTR

[PATCH V2] nvme-pci: fix NULL pointer reference in nvme_alloc_ns

2018-01-04 Thread Jianchao Wang
When the io queues setup or tagset allocation failed, ctrl.tagset is NULL. But the scan work will still be queued and executed, then panic comes up due to NULL pointer reference of ctrl.tagset. To fix this, add a new ctrl state NVME_CTRL_ADMIN_LIVE to inidcate only admin queue is live. When non io