aboutsummaryrefslogtreecommitdiff
path: root/net/unix/sysctl_net_unix.c
diff options
context:
space:
mode:
authorTejun Heo <[email protected]>2008-01-16 12:06:14 +0900
committerLinus Torvalds <[email protected]>2008-01-16 09:54:03 -0800
commite49452c67703d3647467d65275fb893589384fed (patch)
tree137d7dea836f16f4efc3c709981dee3d306aa757 /net/unix/sysctl_net_unix.c
parentcbd9c883696da72b2b1f03f909dbacc04bbf8b58 (diff)
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 <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions