Commit 6f956c7d authored by Al Viro's avatar Al Viro Committed by Greg Kroah-Hartman

do_mount(): fix a leak introduced in 3.9 ("mount: consolidate permission checks")

commit 0d5cadb8 upstream.
Bisected-by: default avatarMichael Leun <lkml20130126@newton.leun.net>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d9168e12
......@@ -2238,12 +2238,11 @@ long do_mount(const char *dev_name, const char *dir_name,
retval = security_sb_mount(dev_name, &path,
type_page, flags, data_page);
if (!retval && !may_mount())
retval = -EPERM;
if (retval)
goto dput_out;
if (!may_mount())
return -EPERM;
/* Default to relatime unless overriden */
if (!(flags & MS_NOATIME))
mnt_flags |= MNT_RELATIME;
......
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