[Devel] [PATCH] autofs: fix leaked pid on error path in autofs4_fill_super

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Fri Sep 1 13:30:14 MSK 2017


Check for protocol happens after pid get.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 fs/autofs4/inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 0ba9c02..2cd4e7e 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -298,7 +298,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
 		       "daemon (%d, %d) kernel (%d, %d)\n",
 			sbi->min_proto, sbi->max_proto,
 			AUTOFS_MIN_PROTO_VERSION, AUTOFS_MAX_PROTO_VERSION);
-		goto fail_dput;
+		goto fail_put_pid;
 	}
 
 	/* Establish highest kernel protocol version */



More information about the Devel mailing list