All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] scsi: mvumi: do not free or reuse buffers a timed-out command left with the device
@ 2026-11-15 12:21 Yehyeong Lee
  2026-11-15 12:21 ` [PATCH v2 1/3] scsi: mvumi: stop the controller bus-mastering before freeing its buffers Yehyeong Lee
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yehyeong Lee @ 2026-11-15 12:21 UTC (permalink / raw)
  To: mkp, James.Bottomley; +Cc: linux-scsi, linux-kernel

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@isslab.korea.ac.kr/
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@isslab.korea.ac.kr/

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-15 12:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-15 12:21 [PATCH v2 0/3] scsi: mvumi: do not free or reuse buffers a timed-out command left with the device Yehyeong Lee
2026-11-15 12:21 ` [PATCH v2 1/3] scsi: mvumi: stop the controller bus-mastering before freeing its buffers Yehyeong Lee
2026-11-15 12:21 ` [PATCH v2 2/3] scsi: mvumi: quarantine a timed-out internal command's buffers Yehyeong Lee
2026-11-15 12:39   ` sashiko-bot
2026-11-15 12:21 ` [PATCH v2 3/3] scsi: mvumi: flush the event work before the host is freed Yehyeong Lee
2026-11-15 12:33   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.