[Devel] [PATCH RHEL7 COMMIT] ve/autofs: drop fix double pid put in error path and leaked pid on error path in autofs4_fill_super

Konstantin Khorenko khorenko at virtuozzo.com
Tue Sep 5 15:18:26 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.35.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.35.6
------>
commit e851cc10aa14e1ca311187fda9a3a53a5e3dee25
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Tue Sep 5 15:13:26 2017 +0300

    ve/autofs: drop fix double pid put in error path and leaked pid on error path in autofs4_fill_super
    
    Drop redundant hunks of 078889e ("VE/AUTOFS: port 71-diff-autofs-combined"),
    they lead to unbalanced pid get/put in autofs4_fill_super().
    
    Fixes: 078889e ("VE/AUTOFS: port 71-diff-autofs-combined")
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 fs/autofs4/autofs_i.h | 1 -
 fs/autofs4/inode.c    | 6 ++----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
index c957d14..39f197c 100644
--- a/fs/autofs4/autofs_i.h
+++ b/fs/autofs4/autofs_i.h
@@ -123,7 +123,6 @@ struct autofs_sb_info {
 	struct list_head active_list;
 	struct list_head expiring_list;
 	struct rcu_head rcu;
-	unsigned is32bit:1;
 };
 
 static inline struct autofs_sb_info *autofs4_sbi(struct super_block *sb)
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index b23cf2a..af7506c 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -127,7 +127,7 @@ static const match_table_t tokens = {
 	{Opt_indirect, "indirect"},
 	{Opt_direct, "direct"},
 	{Opt_offset, "offset"},
-{Opt_err, NULL}
+	{Opt_err, NULL}
 };
 
 static int parse_options(char *options, int *pipefd, kuid_t *uid, kgid_t *gid,
@@ -313,7 +313,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
 
 	if (!pipe) {
 		printk("autofs: could not open pipe file descriptor\n");
-		goto fail_put_pid;
+		goto fail_dput;
 	}
 	ret = autofs_prepare_pipe(pipe);
 	if (ret < 0)
@@ -335,8 +335,6 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
 	printk("autofs: pipe file descriptor does not contain proper ops\n");
 	fput(pipe);
 	/* fall through */
-fail_put_pid:
-	put_pid(sbi->oz_pgrp);
 fail_dput:
 	dput(root);
 	goto fail_free;


More information about the Devel mailing list