Re: 2.6.21-rc suspend regression: sysfs deadlock

Alan Stern
2007-03-13T20:10:04Z

On Tue, 13 Mar 2007, Hugh Dickins wrote:

> On Tue, 13 Mar 2007, Alan Stern wrote:
> >
> > The consensus is that we would be better off keeping Oliver's original
> > patch without your silly change, and instead fixing the particular method
> > call that deadlocked. Can you please try out the patch below with
> > everything else as it was before? It should solve your problem.
>
> Yep, it works fine with your patch in and my silly reverted, thanks.
> But (I was about to say, even before seeing Cornelia's reply, honest!)
> I think you do need to check (audit the source? or is some runtime
> check possible?) for other such "suicidal" sysfs files, which
> seemed to (sysfs-ignorant) me to pose the real problem.

A runtime check wouldn't detect anything until someone tried to use the
file -- at which point the process would deadlock anyway.

On the other hand, a quick survey of the kernel source shows that
DEVICE_ATTR is used over 1500 times. Auditing all of them is not a job
for the faint-of-heart!

Alan Stern