Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH] scsi: bvme6000: fix request_irq failure cleanup
@ 2026-11-23 10:23 Ziheng Wei
  2026-11-23 10:31 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Ziheng Wei @ 2026-11-23 10:23 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-m68k, linux-kernel, Sashiko, stable

NCR_700_detect() registers the SCSI host and allocates the script DMA
memory. If request_irq() fails, bvme6000_probe() only drops the host
reference, leaving the host registered and the DMA memory allocated.

Unregister the host and release the NCR_700 resources before dropping the
reference.

Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://lore.kernel.org/linux-scsi/sashiko-outbox-228089@kernel.org/
Fixes: 8276b58af4dd ("[SCSI] 53c700: m68k BVME6000 NCR53C710 SCSI")
Cc: stable@vger.kernel.org
Signed-off-by: Ziheng Wei <zihengw03@163.com>
---
 drivers/scsi/bvme6000_scsi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c
--- a/drivers/scsi/bvme6000_scsi.c
+++ b/drivers/scsi/bvme6000_scsi.c
@@ -86,6 +86,8 @@ bvme6000_probe(struct platform_device *dev)
 	return 0;
 
  out_put_host:
+	scsi_remove_host(host);
+	NCR_700_release(host);
 	scsi_host_put(host);
  out_free:
 	kfree(hostdata);

base-commit: 97d73c8251226cf27cc6656b4c542869bb8c69fa
-- 
2.43.0


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

end of thread, other threads:[~2026-11-23 10:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 10:23 [PATCH] scsi: bvme6000: fix request_irq failure cleanup Ziheng Wei
2026-11-23 10:31 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox