Commit 1973a122 authored by Ian Kent's avatar Ian Kent Committed by Linus Torvalds

autofs: fix autofs4_fill_super() error exit handling

Somewhere along the line the error handling gotos have become incorrect.

Link: http://lkml.kernel.org/r/20160812024749.12352.15100.stgit@pluto.themaw.netSigned-off-by: default avatarIan Kent <raven@themaw.net>
Cc: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 749800ef
...@@ -313,7 +313,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) ...@@ -313,7 +313,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
if (!pipe) { if (!pipe) {
pr_err("could not open pipe file descriptor\n"); pr_err("could not open pipe file descriptor\n");
goto fail_dput; goto fail_put_pid;
} }
ret = autofs_prepare_pipe(pipe); ret = autofs_prepare_pipe(pipe);
if (ret < 0) if (ret < 0)
...@@ -334,14 +334,14 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) ...@@ -334,14 +334,14 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
fail_fput: fail_fput:
pr_err("pipe file descriptor does not contain proper ops\n"); pr_err("pipe file descriptor does not contain proper ops\n");
fput(pipe); fput(pipe);
/* fall through */ fail_put_pid:
put_pid(sbi->oz_pgrp);
fail_dput: fail_dput:
dput(root); dput(root);
goto fail_free; goto fail_free;
fail_ino: fail_ino:
kfree(ino); kfree(ino);
fail_free: fail_free:
put_pid(sbi->oz_pgrp);
kfree(sbi); kfree(sbi);
s->s_fs_info = NULL; s->s_fs_info = NULL;
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment