lkml.org 
[lkml]   [2012]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2012-06-05 23:01    [W:0.112 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site