]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: remove ns sibling before clearing path
authorKeith Busch <keith.busch@intel.com>
Fri, 5 Oct 2018 14:57:06 +0000 (08:57 -0600)
committerChristoph Hellwig <hch@lst.de>
Mon, 8 Oct 2018 09:53:42 +0000 (11:53 +0200)
commit3ed657ca646ec4790c0c6cf24b018d36af5158d9
treeb5458acfc76ba2bfebdec235efc6fc231192c252
parent6ec49e922738b6ac5051a12b8c8384a878bd19b1
nvme: remove ns sibling before clearing path

The code had been clearing a namespace being deleted as the current
path while that namespace was still in the path siblings list. It is
possible a new IO could set that namespace back to the current path
since it appeared to be an eligable path to select, which may result in
a use-after-free error.

This patch ensures a namespace being removed is not eligable to be reset
as a current path prior to clearing it as the current path.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c