Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04333393 authored by James Bottomley's avatar James Bottomley Committed by Linus Torvalds
Browse files

[PATCH] Fix Fibre Channel boot oops



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: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f89f5948
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -418,8 +418,9 @@ static void scsi_target_reap_work(void *data) {
	if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {
	if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {
		list_del_init(&starget->siblings);
		list_del_init(&starget->siblings);
		spin_unlock_irqrestore(shost->host_lock, flags);
		spin_unlock_irqrestore(shost->host_lock, flags);
		transport_remove_device(&starget->dev);
		device_del(&starget->dev);
		device_del(&starget->dev);
		transport_unregister_device(&starget->dev);
		transport_destroy_device(&starget->dev);
		put_device(&starget->dev);
		put_device(&starget->dev);
		return;
		return;