[PATCH] nvme: add missing lock nesting notation

Christoph Hellwig hch at infradead.org
Tue Apr 5 05:37:42 PDT 2016


On Mon, Apr 04, 2016 at 11:42:23PM -0700, Ming Lin wrote:
> From: Ming Lin <ming.l at ssi.samsung.com>
> 
> When unloading driver, nvme_disable_io_queues() calls nvme_delete_queue()
> that sends nvme_admin_delete_cq command to admin sq. So when the command
> completed, the lock acquired by nvme_irq() actually belongs to admin queue.
> 
> While the lock that nvme_del_cq_end() trying to acquire belongs to io queue.
> So it will not deadlock.
> 
> This patch adds lock nesting notation to fix following report.

Looks fine, but please add a little comment that we might be called with
the AQ q_lock held and that the I/O queue q_lock should always nest
inside the AQ one.



More information about the Linux-nvme mailing list