stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "mnt: If fs_fully_visible fails call put_filesystem." has been added to the 4.4-stable tree
@ 2016-07-11 22:47 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-07-11 22:47 UTC (permalink / raw)
  To: ebiederm, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    mnt: If fs_fully_visible fails call put_filesystem.

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mnt-if-fs_fully_visible-fails-call-put_filesystem.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 97c1df3e54e811aed484a036a798b4b25d002ecf Mon Sep 17 00:00:00 2001
From: "Eric W. Biederman" <ebiederm@xmission.com>
Date: Mon, 6 Jun 2016 15:36:07 -0500
Subject: mnt: If fs_fully_visible fails call put_filesystem.

From: Eric W. Biederman <ebiederm@xmission.com>

commit 97c1df3e54e811aed484a036a798b4b25d002ecf upstream.

Add this trivial missing error handling.

Fixes: 1b852bceb0d1 ("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>

---
 fs/namespace.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2401,8 +2401,10 @@ static int do_new_mount(struct path *pat
 			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;
+			}
 		}
 	}
 


Patches currently in stable-queue which might be from ebiederm@xmission.com are

queue-4.4/mnt-fs_fully_visible-test-the-proper-mount-for-mnt_locked.patch
queue-4.4/mnt-if-fs_fully_visible-fails-call-put_filesystem.patch
queue-4.4/mnt-account-for-ms_rdonly-in-fs_fully_visible.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-11 23:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-11 22:47 Patch "mnt: If fs_fully_visible fails call put_filesystem." has been added to the 4.4-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).