[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1003050926090.1677-100000@iolanthe.rowland.org>
Date: Fri, 5 Mar 2010 09:31:02 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: Hugh Daschbach <hdasch@...adcom.com>
cc: Greg KH <gregkh@...e.de>, Kay Sievers <kay.sievers@...y.org>,
Jan Blunck <jblunck@...e.de>,
David Vrabel <david.vrabel@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
james Bottomley <James.Bottomley@...e.de>,
James Smart <james.smart@...lex.com>
Subject: RE: System reboot hangs due to race against devices_kset->list
triggered by SCSI FC workqueue
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists