May nvme_get_ns_from_disk introduce deadlock?

hch hch at lst.de
Tue May 3 00:52:27 PDT 2016


On Tue, May 03, 2016 at 02:33:32PM +0800, Wang Sheng-Hui wrote:
> Hi,
> 
> I'm reading the code, and found that nvme_get_ns_from_disk *may* 
> introduce deadlock by invoking nvme_free_ns in core.c (nested
> spin_lock(&dev_list_lock) ). 
> But I can't figure out which condition can lead to deadlock.
> 
> Will someone help to explain the code that how can it escape from deadlock?

Just move the put outside the spinlock..  Can you send a patch?



More information about the Linux-nvme mailing list