All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-rdma: stop keep_alive before nvme_uninit_ctrl
@ 2017-06-29 14:33 David Milburn
  2017-06-29 14:45 ` Johannes Thumshirn
  2017-07-02  8:08 ` Sagi Grimberg
  0 siblings, 2 replies; 11+ messages in thread
From: David Milburn @ 2017-06-29 14:33 UTC (permalink / raw)


Its possible for nvme_keep_alive_work() to hit an error
condition after the nvme_uninit_ctrl() in __nvme_rdma_remove_ctrl().
This can lead to usage of NULL pointer in "dev_err(ctrl->device..."
since device has been destroyed by nvme_uninit_ctrl().

This has been seen during continous loop of (discover, connect,
IO, disconnect).

Reported-by: Yi Zhang <yizhan at redhat.com>
Tested-by: Yi Zhang <yizhan at redhat.com>
Signed-off-by: David Milburn <dmilburn at redhat.com>
---
 drivers/nvme/host/rdma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 24397d3..1f73ace 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1683,6 +1683,7 @@ static void nvme_rdma_shutdown_ctrl(struct nvme_rdma_ctrl *ctrl)
 
 static void __nvme_rdma_remove_ctrl(struct nvme_rdma_ctrl *ctrl, bool shutdown)
 {
+	nvme_stop_keep_alive(&ctrl->ctrl);
 	nvme_uninit_ctrl(&ctrl->ctrl);
 	if (shutdown)
 		nvme_rdma_shutdown_ctrl(ctrl);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-07-07 13:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 14:33 [PATCH] nvme-rdma: stop keep_alive before nvme_uninit_ctrl David Milburn
2017-06-29 14:45 ` Johannes Thumshirn
2017-06-29 15:44   ` David Milburn
2017-06-29 16:24     ` James Smart
2017-07-02  8:08 ` Sagi Grimberg
2017-07-04  9:57   ` Sagi Grimberg
2017-07-05 17:41   ` Christoph Hellwig
2017-07-05 19:04     ` Sagi Grimberg
2017-07-05 19:08       ` Christoph Hellwig
2017-07-05 19:18         ` Sagi Grimberg
2017-07-07 13:27   ` David Milburn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.