All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: target: set NULL to iod after assoc refcnt is released
@ 2021-08-14 13:06 Nil Yi
  0 siblings, 0 replies; only message in thread
From: Nil Yi @ 2021-08-14 13:06 UTC (permalink / raw)
  To: james.smart, linux-nvme

After the refcount of assoc is released, the corresponding
pointer should be set to NULL.

Signed-off-by: Nil Yi <teroincn@163.com>
---
 drivers/nvme/target/fc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c
index c6c1839b4..8114cf678 100644
--- a/drivers/nvme/target/fc.c
+++ b/drivers/nvme/target/fc.c
@@ -1870,6 +1870,7 @@ nvmet_fc_ls_disconnect(struct nvmet_fc_tgtport *tgtport,
 
 	/* release get taken in nvmet_fc_find_target_assoc */
 	nvmet_fc_tgt_a_put(assoc);
+	iod->assoc = NULL;
 
 	/*
 	 * The rules for LS response says the response cannot
-- 
2.17.1



_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-14 13:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 13:06 [PATCH] nvme: target: set NULL to iod after assoc refcnt is released Nil Yi

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.