Re: 2.6.21-rc suspend regression: sysfs deadlock

Linus Torvalds
2007-03-07T18:03:12Z

On Wed, 7 Mar 2007, Oliver Neukum wrote:
>
> The problem also exists with unplugging devices. Drivers get no feedback
> to tell them when it is safe to free the data structures associated with
> an attribute.

So you just pointed to *another* data structure that apparently violates
the "you MUST use refcounting" rule.

What is it with you people? It's really simple. Data structures must be
refcounted if you can reach them two different ways.

If you don't use refcounting, then you'd better make sure that the data
can be reached only one way (for example, by *not* exposing it for sysfs).

It really *is* that simple. Read the CodingStyle rules.

Linus