mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Poetzl <herbert@13thfloor.at>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, viro@parcelfarce.linux.theplanet.co.uk
Subject: check_mnt() breaks namespaces
Date: Thu, 15 Jul 2004 01:36:46 +0200	[thread overview]
Message-ID: <20040714233646.GA25298@MAIL.13thfloor.at> (raw)


Hi Andrew!

the check_mnt() in do_add_mount() breaks namespaces
in that way, that it forbids mounting single sb 
filesystems (like procfs) to be mounted in different
namespaces ...

I guess this is unintentional, but who knows ...
(this was introduced in 2.6.8-rc1, 2.6.7-bk20 works
as expected) 


something like this (untested) fixes? it ...

diff -NurpP --minimal linux-2.6.8-rc1/fs/namei.c linux-2.6.8-rc1-fix/fs/namei.c
--- linux-2.6.8-rc1/fs/namei.c  2004-07-12 14:47:08.000000000 +0200
+++ linux-2.6.8-rc1-fix/fs/namei.c        2004-07-12 14:59:08.000000000 +0200
@@ -794,7 +819,5 @@ int do_add_mount(struct vfsmount *newmnt
                ;
-       err = -EINVAL;
-       if (!check_mnt(nd->mnt))
-               goto unlock;

        /* Refuse the same filesystem on the same mount point */
        err = -EBUSY;

best,
Herbert


             reply	other threads:[~2004-07-14 23:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-14 23:36 Herbert Poetzl [this message]
2004-07-18 21:28 ` [PATCH] " viro

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=20040714233646.GA25298@MAIL.13thfloor.at \
    --to=herbert@13thfloor.at \
    --cc=akpm@osdl.org \
    --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

all inboxes | Powered by JetHome®