]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:28 +0000 (11:56 +0200)
commita28112cc55013cd8cbd5d36b5115a5b851151bd9
tree5e0989be73a7d063d04b14da681fd0abed8ca977
parent0c13b417fe581d5ebd966961bb0d7c118b3fea30
nvmet-fc: move lsop put work to nvmet_fc_ls_req_op

[ Upstream commit db5a5406fb7e5337a074385c7a3e53c77f2c1bd3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/target/fc.c