[PATCH v2 0/3] scsi: mvumi: do not free or reuse buffers a timed-out command left with the device
From: Yehyeong Lee
Date: Sun Nov 15 2026 - 07:22:11 EST
1/3 stops the controller bus-mastering before mvumi_detach_one() frees
the buffers it was given. 2/3 keeps a timed-out internal command's
buffers until then, and stops the probe loop from handing them straight
back to the controller. 3/3 waits for the event work before the host it
points at is freed.
v1 -> v2:
- 1/3 is unchanged.
- 2/3 also stops mvumi_probe_devices() after a timeout instead of
asking the next target id with the same frame and data buffer, and
frees the command on the duplicate-wwid exit, which returned
without doing so.
- 3/3 is new.
The review of v1 raised three things, and each is answered above: the probe
loop's reuse and the duplicate-wwid leak in 2/3, and the event work that
mvumi_detach_one() never waited for in 3/3.
Two more, both older than this series, are deliberately left out. The DMA
address rebuilt from the command frame in mvumi_delete_internal_cmd() is
already in flight as 7/9 of
https://lore.kernel.org/all/20261015045213.3975845-1-yhlee@xxxxxxxxxxxxxxxxxx/
which deletes that expression altogether. The unlocked sync_cmd test in
mvumi_issue_blocked_cmd() is a separate defect in the submit/complete
handshake - it does not release a tag twice, both releases being under
host_lock, but it can leave the counter at -1 - and wants its own patch.
Based on mainline. It still conflicts textually with that 7/9 in
mvumi_delete_internal_cmd(), only in 2/3, and I will rebase whichever
goes in second. I have no mvumi hardware; this was checked with a
KUnit model.
v1:
https://lore.kernel.org/all/20261114014430.489668-1-yhlee@xxxxxxxxxxxxxxxxxx/
Best regards,
Yehyeong Lee
Yehyeong Lee (3):
scsi: mvumi: stop the controller bus-mastering before freeing its
buffers
scsi: mvumi: quarantine a timed-out internal command's buffers
scsi: mvumi: flush the event work before the host is freed
drivers/scsi/mvumi.c | 73 ++++++++++++++++++++++++++++++++++++++------
drivers/scsi/mvumi.h | 3 ++
2 files changed, 66 insertions(+), 10 deletions(-)
base-commit: 23c62304dde29abe92013d85910d03a77dada35d
--
2.43.0