* [PATCH] scsi: myrb: quiesce the SCSI host before controller teardown
@ 2026-08-06 6:06 Hongyan Xu
0 siblings, 0 replies; only message in thread
From: Hongyan Xu @ 2026-08-06 6:06 UTC (permalink / raw)
To: Hannes Reinecke, James E . J . Bottomley, Martin K . Petersen
Cc: linux-scsi, linux-kernel, stable, jianhao.xu, Hongyan Xu
myrb_remove() tears down the controller resources and drops the host
reference without first removing the SCSI host. The registered host can
therefore continue to dispatch queuecommand callbacks that use the
controller MMIO mappings and DMA pools after teardown. The monitor work is
also canceled only after the MMIO mappings have been released.
Remove the SCSI host before issuing the final controller command. Then stop
the monitor and destroy its pools before unmapping the hardware and
dropping the host reference.
Fixes: 081ff398c56c ("scsi: myrb: Add Mylex RAID controller (block interface)")
Cc: stable@vger.kernel.org
Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
---
drivers/scsi/myrb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c
index 3678b66310ed..adb2fadf9146 100644
--- a/drivers/scsi/myrb.c
+++ b/drivers/scsi/myrb.c
@@ -3496,9 +3496,10 @@ static void myrb_remove(struct pci_dev *pdev)
struct myrb_hba *cb = pci_get_drvdata(pdev);
shost_printk(KERN_NOTICE, cb->host, "Flushing Cache...");
+ scsi_remove_host(cb->host);
myrb_exec_type3(cb, MYRB_CMD_FLUSH, 0);
- myrb_cleanup(cb);
myrb_destroy_mempools(cb);
+ myrb_cleanup(cb);
}
--
2.50.1.windows.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-06 6:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06 6:06 [PATCH] scsi: myrb: quiesce the SCSI host before controller teardown Hongyan Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox