]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] sysfs: reinstate exclusion between method calls and attribute unregistration
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 15 Mar 2007 19:51:28 +0000 (15:51 -0400)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 15 Mar 2007 22:29:26 +0000 (15:29 -0700)
commitd01359a034d584913b529a90ab47e37d42a4253a
tree696e696176a1e72abb80afa6112fc057b39bf86b
parent2a543be7109150dd6376420403ef6bc92d677c06
[PATCH] sysfs: reinstate exclusion between method calls and attribute unregistration

This patch (as869) reinstates the mutual exclusion between sysfs
attribute method calls and attribute unregistration.  The
previously-reported deadlocks have been fixed, and this exclusion is
by far the simplest way to avoid races during driver unbinding.

The check for orphaned read-buffers has been moved down slightly, so
that the remainder of a partially-read buffer will still be available
to userspace even after the attribute has been unregistered.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/sysfs/file.c
fs/sysfs/inode.c