]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: Namespace use after free on surprise removal
authorKeith Busch <keith.busch@intel.com>
Fri, 31 Jan 2014 23:53:39 +0000 (16:53 -0700)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Sun, 2 Feb 2014 18:31:15 +0000 (13:31 -0500)
commit0814e7222442035d5b0b44fcd32a9964550762ab
tree1ac24bb79b089a52e162fa80b44d1a2ca0127051
parentf8f0e756a858fd444e0cd937d4919a5cc1a7c4d9
NVMe: Namespace use after free on surprise removal

An nvme block device may have open references when the device is
removed. New commands may still be sent on the removed device, so we
need to ref count the opens, return errors for new commands, and not
free the namespace and nvme_dev until all references are closed.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme-core.c