mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* check_mnt() breaks namespaces
@ 2004-07-14 23:36 Herbert Poetzl
  2004-07-18 21:28 ` [PATCH] " viro
  0 siblings, 1 reply; 2+ messages in thread
From: Herbert Poetzl @ 2004-07-14 23:36 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, viro


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-18 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-14 23:36 check_mnt() breaks namespaces Herbert Poetzl
2004-07-18 21:28 ` [PATCH] " viro

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®