public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Fix Fibre Channel boot oops
@ 2005-12-26 15:58 James Bottomley
  0 siblings, 0 replies; only message in thread
From: James Bottomley @ 2005-12-26 15:58 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: SCSI Mailing List, Linux Kernel

The oops is characteristic of the underlying device being removed from
visibility before the class device, and sure enough we do device_del()
before transport_unregister() in the scsi_target_reap() routines.  I've
no idea why this is suddenly showing up, since the code has been in
there since that function was first invented.  However, I've confirmed
this fixes Andrew Vasquez's boot oops.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

---

P.S. I told you if you waited a while I'd get another bug ...

James

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -418,8 +418,9 @@ static void scsi_target_reap_work(void *
 	if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {
 		list_del_init(&starget->siblings);
 		spin_unlock_irqrestore(shost->host_lock, flags);
+		transport_remove_device(&starget->dev);
 		device_del(&starget->dev);
-		transport_unregister_device(&starget->dev);
+		transport_destroy_device(&starget->dev);
 		put_device(&starget->dev);
 		return;
 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-26 15:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-26 15:58 [PATCH 1/1] Fix Fibre Channel boot oops James Bottomley

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