* [PATCH] nvme: target: clean assoc pointer after releasing its refcnt
@ 2021-08-14 12:28 Nil Yi
0 siblings, 0 replies; only message in thread
From: Nil Yi @ 2021-08-14 12:28 UTC (permalink / raw)
To: james.smart, linux-nvme
After releasing the refcnt of iod->assoc, we should assign
NULL to it.
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 22b510816..c6c1839b4 100644
--- a/drivers/nvme/target/fc.c
+++ b/drivers/nvme/target/fc.c
@@ -1780,6 +1780,7 @@ nvmet_fc_ls_create_connection(struct nvmet_fc_tgtport *tgtport,
/* release get taken in nvmet_fc_find_target_assoc */
nvmet_fc_tgt_a_put(iod->assoc);
+ iod->assoc = NULL;
}
}
--
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 12:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-14 12:28 [PATCH] nvme: target: clean assoc pointer after releasing its refcnt Nil Yi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox