[withdrawn] autofs-fix-possible-inode-leak-in-autofs_fill_super.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: autofs: fix possible inode leak in autofs_fill_super()
has been removed from the -mm tree.  Its filename was
     autofs-fix-possible-inode-leak-in-autofs_fill_super.patch

This patch was dropped because it was withdrawn

------------------------------------------------------
From: Ian Kent <raven@xxxxxxxxxx>
Subject: autofs: fix possible inode leak in autofs_fill_super()

There is no check at all for a failure to allocate the root inode in
autofs_fill_super(), handle it.

Link: http://lkml.kernel.org/r/154296971705.9889.9822861969081020188.stgit@pluto-themaw-net
Signed-off-by: Ian Kent <raven@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/autofs/inode.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- a/fs/autofs/inode.c~autofs-fix-possible-inode-leak-in-autofs_fill_super
+++ a/fs/autofs/inode.c
@@ -254,9 +254,13 @@ int autofs_fill_super(struct super_block
 		goto fail_free;
 	}
 	root_inode = autofs_get_inode(s, S_IFDIR | 0755);
+	if (!root_inode) {
+		ret = -ENOMEM;
+		goto fail_ino;
+	}
 	root = d_make_root(root_inode);
 	if (!root)
-		goto fail_ino;
+		goto fail_iput;
 	pipe = NULL;
 
 	root->d_fsdata = ino;
@@ -304,8 +308,8 @@ int autofs_fill_super(struct super_block
 	root_inode->i_op = &autofs_dir_inode_operations;
 
 	pr_debug("pipe fd = %d, pgrp = %u\n", pipefd, pid_nr(sbi->oz_pgrp));
-	pipe = fget(pipefd);
 
+	pipe = fget(pipefd);
 	if (!pipe) {
 		pr_err("could not open pipe file descriptor\n");
 		goto fail_put_pid;
@@ -334,6 +338,8 @@ fail_put_pid:
 fail_dput:
 	dput(root);
 	goto fail_free;
+fail_iput:
+	iput(root_inode);
 fail_ino:
 	autofs_free_ino(ino);
 fail_free:
_

Patches currently in -mm which might be from raven@xxxxxxxxxx are

autofs-improve-ioctl-sbi-checks.patch
autofs-simplify-parse_options-function-call.patch
autofs-change-catatonic-setting-to-a-bit-flag.patch
autofs-add-strictexpire-mount-option.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux