kernel-aes67/fs/sysfs
Tejun Heo e49452c677 sysfs: make sysfs_lookup() return ERR_PTR(-ENOENT) on failed lookup
sysfs tries to keep dcache a strict subset of sysfs_dirent tree by
shooting down dentries when a node is removed, that is, no negative
dentry for sysfs.  However, the lookup function returned NULL and thus
created negative dentries when the target node didn't exist.

Make sysfs_lookup() return ERR_PTR(-ENOENT) on lookup failure.  This
fixes the NULL dereference bug in sysfs_get_dentry() discovered by
bluetooth rfcomm device moving around.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-16 09:54:03 -08:00
..
bin.c sysfs: add copyrights 2007-10-12 14:51:12 -07:00
dir.c sysfs: make sysfs_lookup() return ERR_PTR(-ENOENT) on failed lookup 2008-01-16 09:54:03 -08:00
file.c sysfs: fix off-by-one error in fill_read_buffer() 2007-11-28 13:53:53 -08:00
group.c sysfs: Remove first pass at shadow directory support 2007-10-12 14:51:03 -07:00
inode.c mm: bdi init hooks 2007-10-17 08:42:45 -07:00
Makefile
mount.c mm: bdi init hooks 2007-10-17 08:42:45 -07:00
symlink.c sysfs: add copyrights 2007-10-12 14:51:12 -07:00
sysfs.h sysfs: make sysfs_{get,put}_active() static 2007-10-30 21:52:33 -07:00