aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorJeff Layton <[email protected]>2012-02-23 14:37:45 +0000
committerSteve French <[email protected]>2012-02-27 05:16:26 +0000
commit5bccda0ebc7c0331b81ac47d39e4b920b198b2cd (patch)
tree542363c187479df4124bed5441a7fc66bafc4065 /fs/proc/array.c
parentCIFS: Fix mkdir/rmdir bug for the non-POSIX case (diff)
downloadkernel-5bccda0ebc7c0331b81ac47d39e4b920b198b2cd.tar.gz
kernel-5bccda0ebc7c0331b81ac47d39e4b920b198b2cd.zip
cifs: fix dentry refcount leak when opening a FIFO on lookup
The cifs code will attempt to open files on lookup under certain circumstances. What happens though if we find that the file we opened was actually a FIFO or other special file? Currently, the open filehandle just ends up being leaked leading to a dentry refcount mismatch and oops on umount. Fix this by having the code close the filehandle on the server if it turns out not to be a regular file. While we're at it, change this spaghetti if statement into a switch too. Cc: [email protected] Reported-by: CAI Qian <[email protected]> Tested-by: CAI Qian <[email protected]> Reviewed-by: Shirish Pargaonkar <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions