]> git.baikalelectronics.ru Git - kernel.git/commit
nvme/pci: Don't free queues on error
authorKeith Busch <keith.busch@intel.com>
Tue, 15 Nov 2016 20:56:26 +0000 (15:56 -0500)
committerJens Axboe <axboe@fb.com>
Wed, 16 Nov 2016 19:39:57 +0000 (12:39 -0700)
commit6b823ae5377ca634cc4b202911d7f8c48666e57b
tree9f1c735aa5b75345e71baca7a3bcbe19c8edc568
parenta9a80507e9dc17626557e93f471300f86f266efd
nvme/pci: Don't free queues on error

The nvme_remove function tears down all allocated resources in the correct
order, so no need to free queues on error during initialization. This
fixes possible use-after-free errors when queues are still associated
with a blk-mq hctx.

Reported-by: Scott Bauer <scott.bauer@intel.com>
Tested-by: Scott Bauer <scott.bauer@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimbeg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/pci.c