[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 3 Mar 2010 15:25:47 -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 Wed, 3 Mar 2010, Hugh Daschbach wrote:
> > Can't we just protect the list? What is wanting to write to the list
> > while shutdown is happening?
>
> Indeed, Alan suggested holding the kset spinlock while iterating the
> list. Unfortunately, the device shutdown routines may sleep. At least
> the SCSI sd_shutdown routine issues I/O to the device as part of
> flushing device caches. I would guess other subsystems sleep as well.
What I meant was that you should hold the spinlock while finding and
unlinking the last device on the list. Clearly you shouldn't hold it
while calling the device shutdown routine.
> I'll try klist. That looks like a good mediator between traversal and
> removal.
Yes, it removes a lot of difficulties.
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