linux/fs/sysfs
Oliver Neukum 94bebf4d1b Driver core: fix race in sysfs between sysfs_remove_file() and read()/write()
This patch prevents a race between IO and removing a file from sysfs.
It introduces a list of sysfs_buffers associated with a file at the inode.
Upon removal of a file the list is walked and the buffers marked orphaned.
IO to orphaned buffers fails with -ENODEV. The driver can safely free
associated data structures or be unloaded.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Acked-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 10:37:13 -08:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bin.c Driver core: fix race in sysfs between sysfs_remove_file() and read()/write() 2007-02-07 10:37:13 -08:00
dir.c Driver core: fix race in sysfs between sysfs_remove_file() and read()/write() 2007-02-07 10:37:13 -08:00
file.c Driver core: fix race in sysfs between sysfs_remove_file() and read()/write() 2007-02-07 10:37:13 -08:00
group.c Driver core: fix race in sysfs between sysfs_remove_file() and read()/write() 2007-02-07 10:37:13 -08:00
inode.c Driver core: fix race in sysfs between sysfs_remove_file() and read()/write() 2007-02-07 10:37:13 -08:00
mount.c Driver core: fix race in sysfs between sysfs_remove_file() and read()/write() 2007-02-07 10:37:13 -08:00
symlink.c Driver core: fix race in sysfs between sysfs_remove_file() and read()/write() 2007-02-07 10:37:13 -08:00
sysfs.h Driver core: fix race in sysfs between sysfs_remove_file() and read()/write() 2007-02-07 10:37:13 -08:00