Skip to contentSkip to conversation

nvme: target: clean assoc pointer after releasing its refcnt

PATCH New Nil Yi 1 participant 1 message Aug 14, 2021

Subsystems (3)
lore
Share & tools
lore

Nil Yi

author
#0 lore raw

PATCH 1/1 nvme: target: clean assoc pointer after releasing its refcnt

After releasing the refcnt of iod->assoc, we should assign NULL to it.

---
 drivers/nvme/target/fc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvme/target/fc.c +1 -0
index 22b510816..c6c1839b4 100644
@@ -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;
 		}
 	}
 
Signature · 8 lines
2.17.1



_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme