Hang Condition in nvme_ns_remove
Jeff Lien
Jeff.Lien at hgst.com
Fri May 13 13:52:15 PDT 2016
I encountered another hang condition in the nvme_ns_remove function. It's caused when nvme_ns_remove is called by nvme_scan_namespaces/__nvme_scan_namespaces. In nvme_scan_namespaces, the namespaces_mutex is locked; nvme_ns_remove will also try to get that mutex right before the call to list_del_init. When that handles it hangs there.
It could be fixed by removing the mutex_lock call in nvme_ns_remove and then changing the code so that all other callers of ns_remove get the lock instead. Since I'm not real familiar with this part of the code, I don't know if this is the best fix or not. Asking for your input on that.
----------------------------------------------------------
Jeff Lien
Linux Device Driver Development
Device Host Apps and Drivers
Western Digital Corporation
e. jeff.lien at hgst.com
o. +1-507-322-2416
m. +1-507-273-9124
More information about the Linux-nvme
mailing list