mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
mnt: If fs_fully_visible fails call put_filesystem.
commit 97c1df3e54e811aed484a036a798b4b25d002ecf upstream.
Add this trivial missing error handling.
Fixes: 1b852bceb0 ("mnt: Refactor the logic for mounting sysfs and proc in a user namespace")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6256d2f541
commit
a400a79321
@@ -2401,8 +2401,10 @@ static int do_new_mount(struct path *path, const char *fstype, int flags,
|
||||
mnt_flags |= MNT_NODEV | MNT_LOCK_NODEV;
|
||||
}
|
||||
if (type->fs_flags & FS_USERNS_VISIBLE) {
|
||||
if (!fs_fully_visible(type, &mnt_flags))
|
||||
if (!fs_fully_visible(type, &mnt_flags)) {
|
||||
put_filesystem(type);
|
||||
return -EPERM;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user