stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "mnt: Don't propagate umounts in __detach_mounts" has been added to the 3.19-stable tree
@ 2015-05-02 15:56 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-05-02 15:56 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: Don't propagate umounts in __detach_mounts

to the 3.19-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-don-t-propagate-umounts-in-__detach_mounts.patch
and it can be found in the queue-3.19 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 8318e667f176f7ea34451a1a530634e293f216ac Mon Sep 17 00:00:00 2001
From: "Eric W. Biederman" <ebiederm@xmission.com>
Date: Wed, 24 Dec 2014 07:35:10 -0600
Subject: mnt: Don't propagate umounts in __detach_mounts

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

commit 8318e667f176f7ea34451a1a530634e293f216ac upstream.

Invoking mount propagation from __detach_mounts is inefficient and
wrong.

It is inefficient because __detach_mounts already walks the list of
mounts that where something needs to be done, and mount propagation
walks some subset of those mounts again.

It is actively wrong because if the dentry that is passed to
__detach_mounts is not part of the path to a mount that mount should
not be affected.

change_mnt_propagation(p,MS_PRIVATE) modifies the mount propagation
tree of a master mount so it's slaves are connected to another master
if possible.  Which means even removing a mount from the middle of a
mount tree with __detach_mounts will not deprive any mount propagated
mount events.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/namespace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1497,7 +1497,7 @@ void __detach_mounts(struct dentry *dent
 	lock_mount_hash();
 	while (!hlist_empty(&mp->m_list)) {
 		mnt = hlist_entry(mp->m_list.first, struct mount, mnt_mp_list);
-		umount_tree(mnt, UMOUNT_PROPAGATE);
+		umount_tree(mnt, 0);
 	}
 	unlock_mount_hash();
 	put_mountpoint(mp);


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

queue-3.19/mnt-don-t-propagate-umounts-in-__detach_mounts.patch
queue-3.19/mnt-improve-the-umount_tree-flags.patch

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

only message in thread, other threads:[~2015-05-02 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-02 15:56 Patch "mnt: Don't propagate umounts in __detach_mounts" has been added to the 3.19-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).