From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Mounting on floating mounts is possible
Date: Sat, 6 Nov 2004 06:04:55 +0100 [thread overview]
Message-ID: <20041106060455.0100e3ec@doener> (raw)
Hi,
this[1] patch changed check_mnt() so that mounting on a floating mount
(i.e. one that was unmounted using MNT_DETACH and was still in use) is
possible, since we no longer check if the mountpoint is actually
reachable. The problem is that we may lose any reference to the floating
mount, but the mount on it will keep it alive, thus it will never go
away. The following patch removes the reference from the mount to its
namespace when it is unmounted lazily, so that check_mnt protects from
such mounts.
Please CC me as I'm not subscribed to the list.
Bjoern
[1] http://lwn.net/Articles/91946/
diff -uNr --minimal a/fs/namespace.c b/fs/namespace.c
--- a/fs/namespace.c 2004-10-31 00:41:02.000000000 +0200
+++ b/fs/namespace.c 2004-11-06 04:38:37.299013810 +0100
@@ -358,6 +358,7 @@
} else {
struct nameidata old_nd;
detach_mnt(mnt, &old_nd);
+ mnt->mnt_namespace = NULL;
spin_unlock(&vfsmount_lock);
path_release(&old_nd);
}
next reply other threads:[~2004-11-06 5:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-06 5:04 Björn Steinbrink [this message]
2004-11-08 16:20 ` [PATCH] Mounting on floating mounts is possible Mike Waychison
2004-11-08 17:20 ` Björn Steinbrink
2004-11-08 17:53 ` Mike Waychison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041106060455.0100e3ec@doener \
--to=b.steinbrink@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox