nvme: release namespace SRCU protection before performing controller ioctls
authorChristoph Hellwig <hch@lst.de>
Fri, 17 May 2019 09:47:36 +0000 (11:47 +0200)
committerKeith Busch <keith.busch@intel.com>
Fri, 17 May 2019 17:07:11 +0000 (11:07 -0600)
commit5fb4aac756acacf260b9ebd88747251effa3a2f2
treed13d9c345611a678d7707bed27dddb39e4f92f9e
parent90ec611adcf20b96d0c2b7166497d53e4301a57f
nvme: release namespace SRCU protection before performing controller ioctls

Holding the SRCU critical section protecting the namespace list can
cause deadlocks when using the per-namespace admin passthrough ioctl to
delete as namespace.  Release it earlier when performing per-controller
ioctls to avoid that.

Reported-by: Kenneth Heitke <kenneth.heitke@intel.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c