Re: 2.6.21-rc suspend regression: sysfs deadlock

Dmitry Torokhov
2007-03-07T15:56:25Z

On 3/6/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> - removing the buffer is now just
>
> mutex_lock(&inode->i_mutex);
> buffer = inode->i_private;
> inode->i_private = NULL;
> mutex_unlock(&inode->i_mutex);
>
> put_sysfs_buffer(buffer);
>
> - everybody is happy!
>

... with the exception that it will again make data associated with
sysfs attributes accessible past the point of returning from
sysfs_remove_file. And that was the point so drivers would not have to
care about handling access to extra data (such as static strings) past
the driver unload.

I wonder if we should keep Oliver's change and require attribute
implementations to offload "delete me" kind of actions to workqueues.

--
Dmitry