Skip to content

Commit

Permalink
[PATCH] Fix Fibre Channel boot oops
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
James Bottomley authored and Linus Torvalds committed Dec 26, 2005
1 parent f89f594 commit 0433339
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,9 @@ static void scsi_target_reap_work(void *data) {
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;

Expand Down

0 comments on commit 0433339

Please sign in to comment.