1
0
Fork 0
alistair23-linux/fs/autofs4
Jesper Juhl 3dc8fe4dca autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd()
In fs/autofs4/dev-ioctl.c::autofs_dev_ioctl_setpipefd() we call fget(),
which may return NULL, but we do not explicitly test for that NULL return
so we may end up dereferencing a NULL pointer - bad.

When I originally submitted this patch I had chosen EBUSY as the return
value to use if this happens. Ian Kent was kind enough to explain why that
would most likely be wrong and why EBADF should most likely be used
instead. This version of the patch uses EBADF.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-03-24 14:54:35 -04:00
..
Kconfig fs/Kconfig: move autofs, autofs4 out 2009-01-22 13:15:54 +03:00
Makefile autofs4: add miscellaneous device for ioctls 2008-10-16 11:21:39 -07:00
autofs_i.h autofs4 - remove autofs4_lock 2011-03-24 14:54:35 -04:00
dev-ioctl.c autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd() 2011-03-24 14:54:35 -04:00
expire.c autofs4 - remove autofs4_lock 2011-03-24 14:54:35 -04:00
init.c convert get_sb_nodev() users 2010-10-29 04:16:31 -04:00
inode.c autofs4: clean ->d_release() and autofs4_free_ino() up 2011-01-18 01:21:29 -05:00
root.c autofs4 - remove autofs4_lock 2011-03-24 14:54:35 -04:00
symlink.c autofs4: keep symlink body in inode->i_private 2011-01-18 01:21:27 -05:00
waitq.c autofs4 - remove autofs4_lock 2011-03-24 14:54:35 -04:00