check_mnt() breaks namespaces
From: Herbert Poetzl
Date: Wed Jul 14 2004 - 18:37:45 EST
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/