diff options
Diffstat (limited to 'fs/autofs4/dev-ioctl.c')
-rw-r--r-- | fs/autofs4/dev-ioctl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index ba4a38b9c22f..509fe1eb66ae 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c | |||
@@ -372,6 +372,10 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp, | |||
372 | return -EBUSY; | 372 | return -EBUSY; |
373 | } else { | 373 | } else { |
374 | struct file *pipe = fget(pipefd); | 374 | struct file *pipe = fget(pipefd); |
375 | if (!pipe) { | ||
376 | err = -EBADF; | ||
377 | goto out; | ||
378 | } | ||
375 | if (!pipe->f_op || !pipe->f_op->write) { | 379 | if (!pipe->f_op || !pipe->f_op->write) { |
376 | err = -EPIPE; | 380 | err = -EPIPE; |
377 | fput(pipe); | 381 | fput(pipe); |
@@ -551,7 +555,7 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp, | |||
551 | 555 | ||
552 | err = have_submounts(path.dentry); | 556 | err = have_submounts(path.dentry); |
553 | 557 | ||
554 | if (follow_down(&path)) | 558 | if (follow_down_one(&path)) |
555 | magic = path.mnt->mnt_sb->s_magic; | 559 | magic = path.mnt->mnt_sb->s_magic; |
556 | } | 560 | } |
557 | 561 | ||
@@ -724,6 +728,7 @@ static const struct file_operations _dev_ioctl_fops = { | |||
724 | .unlocked_ioctl = autofs_dev_ioctl, | 728 | .unlocked_ioctl = autofs_dev_ioctl, |
725 | .compat_ioctl = autofs_dev_ioctl_compat, | 729 | .compat_ioctl = autofs_dev_ioctl_compat, |
726 | .owner = THIS_MODULE, | 730 | .owner = THIS_MODULE, |
731 | .llseek = noop_llseek, | ||
727 | }; | 732 | }; |
728 | 733 | ||
729 | static struct miscdevice _autofs_dev_ioctl_misc = { | 734 | static struct miscdevice _autofs_dev_ioctl_misc = { |