]> Gentwo Git Trees - linux/.git/commit
nvmet-fc: move lsop put work to nvmet_fc_ls_req_op
authorDaniel Wagner <wagi@kernel.org>
Tue, 2 Sep 2025 10:22:00 +0000 (12:22 +0200)
committerKeith Busch <kbusch@kernel.org>
Mon, 15 Sep 2025 15:52:57 +0000 (08:52 -0700)
commitdb5a5406fb7e5337a074385c7a3e53c77f2c1bd3
tree934b649e1e1e7637b31038274a3e97117daa3ec2
parent6ff1bd7846680dfdaafc68d7fcd0ab7e3bcbc4a0
nvmet-fc: move lsop put work to nvmet_fc_ls_req_op

It’s possible for more than one async command to be in flight from
__nvmet_fc_send_ls_req. For each command, a tgtport reference is taken.

In the current code, only one put work item is queued at a time, which
results in a leaked reference.

To fix this, move the work item to the nvmet_fc_ls_req_op struct, which
already tracks all resources related to the command.

Fixes: 710c69dbaccd ("nvmet-fc: avoid deadlock on delete association path")
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/fc.c