[PATCH v2 0/2] scsi: libiscsi: tighten management task completion

From: Yehyeong Lee

Date: Fri Nov 13 2026 - 18:40:00 EST


1/2 stops the receive path from completing a management task that is still
queued or still being filled in, so a slot cannot be returned to the task
pool while the transmit path still owns it. 2/2 stops it from completing a
NOP-Out sent with RESERVED_ITT, whose single reference belongs to the
transport, so that reference cannot be dropped twice.

v2: no code change. v1 of 2/2 was sent on its own but depends on 1/2, so
it did not apply; both are now in one series.

v1 of 1/2:
https://lore.kernel.org/all/20261113145140.282504-1-yhlee@xxxxxxxxxxxxxxxxxx/
v1 of 2/2:
https://lore.kernel.org/all/20261113232322.395246-1-yhlee@xxxxxxxxxxxxxxxxxx/

The review of 1/2 raised two issues: 2/2 fixes the second one, and the
first - the window between the state store in iscsi_prep_mgmt_task() and
iscsi_get_task() in iscsi_xmit_task() - is not addressed here.

Best regards,
Yehyeong Lee

Yehyeong Lee (2):
scsi: libiscsi: only complete a task that has been sent
scsi: libiscsi: do not complete a task sent with a reserved ITT

drivers/scsi/libiscsi.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)


base-commit: 7e1392a42ea288d70a266f6553fe06f57f8647ea
--
2.43.0