Messages in this thread | | | Date | Tue, 5 Jun 2012 16:44:15 -0400 (EDT) | From | Alan Stern <> | Subject | Re: [PATCH] driver core: fix shutdown races with probe/remove |
| |
On Wed, 6 Jun 2012, Greg Kroah-Hartman wrote:
> > On the whole, it might be easier just to hold the device lock during > > the shutdown call. > > That sounds much simpler to me.
Maybe use device_trylock() in a loop, and if the lock can't be acquired within a second or so, either call the shutdown method without the lock or else skip the device entirely.
That way, crashed or buggy drivers will have less chance of interfering with system shutdown.
Alan Stern
| |