RE: System reboot hangs due to race against devices_kset->listtriggered by SCSI FC workqueue
From: Alan Stern
Date: Fri Mar 05 2010 - 09:31:11 EST
On Thu, 4 Mar 2010, Hugh Daschbach wrote:
> I have added get_device()/put_device() to ensure there's the device
> hasn't fully disappeared before calling list_del_init(). Is this
> needed?
Yes, it is. In fact, it's necessary to insure the device doesn't
disappear before you call the shutdown routines!
> If so, there's "might_sleep()" commented out in put_device().
> Do I need to release the lock before calling put_device()?
A better approach might be to do the list_del_init() while still
holding the initial spinlock, before you call the shutdown methods.
Then do the put_device() before reacquiring the spinlock at the end of
the loop.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/