* [PATCH] scsi: scsi_debug: Drain target cleanup before module exit
@ 2026-10-26 20:23 Giuseppe Piscitelli
2026-10-29 1:23 ` Martin K. Petersen
2026-10-31 1:40 ` Martin K. Petersen (Oracle)
0 siblings, 2 replies; 3+ messages in thread
From: Giuseppe Piscitelli @ 2026-10-26 20:23 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen; +Cc: linux-scsi, linux-kernel
Target destruction queues cleanup in an exclusive async domain. The
module loader's async_synchronize_full() does not wait for exclusive
domains. Wait for target cleanup after removing the hosts and before
removing the debugfs root and returning from module exit.
Fixes: b402a0dce64a ("scsi: scsi_debug: Fix create target debugfs failure")
Signed-off-by: Giuseppe Piscitelli <ooonea@gmail.com>
---
OpenAI Codex found this gap during SCSI teardown analysis and wrote the
fix and its local validation.
Earlier validation included a Linux 7.3 build and three ordinary
corrected-module lifecycles. No unpatched race was forced; this gap was
not established as the cause of the original allocation messages. This
base was checked for applicability; no new build or runtime test was run.
drivers/scsi/scsi_debug.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 3346562..8aa8652 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -8675,6 +8675,7 @@ static void __exit scsi_debug_exit(void)
sdebug_erase_all_stores(false);
xa_destroy(per_store_ap);
+ async_synchronize_full_domain(&sdebug_async_domain);
debugfs_remove(sdebug_debugfs_root);
}
base-commit: 6a53f401e671b75c129245e371ca6e9d47fc3c9a
--
2.54.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] scsi: scsi_debug: Drain target cleanup before module exit
2026-10-26 20:23 [PATCH] scsi: scsi_debug: Drain target cleanup before module exit Giuseppe Piscitelli
@ 2026-10-29 1:23 ` Martin K. Petersen
2026-10-31 1:40 ` Martin K. Petersen (Oracle)
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2026-10-29 1:23 UTC (permalink / raw)
To: Giuseppe Piscitelli
Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi, linux-kernel
Giuseppe,
> Target destruction queues cleanup in an exclusive async domain. The
> module loader's async_synchronize_full() does not wait for exclusive
> domains. Wait for target cleanup after removing the hosts and before
> removing the debugfs root and returning from module exit.
Applied to 7.4/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: scsi_debug: Drain target cleanup before module exit
2026-10-26 20:23 [PATCH] scsi: scsi_debug: Drain target cleanup before module exit Giuseppe Piscitelli
2026-10-29 1:23 ` Martin K. Petersen
@ 2026-10-31 1:40 ` Martin K. Petersen (Oracle)
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen (Oracle) @ 2026-10-31 1:40 UTC (permalink / raw)
To: James E.J. Bottomley, Giuseppe Piscitelli
Cc: Martin K . Petersen, linux-scsi, linux-kernel
On Mon, 26 Oct 2026 21:23:41 +0100, Giuseppe Piscitelli wrote:
> Target destruction queues cleanup in an exclusive async domain. The
> module loader's async_synchronize_full() does not wait for exclusive
> domains. Wait for target cleanup after removing the hosts and before
> removing the debugfs root and returning from module exit.
Applied to 7.4/scsi-queue, thanks!
[1/1] scsi: scsi_debug: Drain target cleanup before module exit
https://git.kernel.org/mkp/scsi/c/34c99ce29939
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-31 1:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 20:23 [PATCH] scsi: scsi_debug: Drain target cleanup before module exit Giuseppe Piscitelli
2026-10-29 1:23 ` Martin K. Petersen
2026-10-31 1:40 ` Martin K. Petersen (Oracle)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®