lkml.org 
[lkml]   [2007]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] MNT_UNBINDABLE
Some time ago ( http://lkml.org/lkml/2007/6/19/128 )
I wrote about MNT_UNBINDABLE that it felt like a bug
that it is not reset by "mount --make-private".

Today I happened to see mount(8) and Documentation/sharedsubtree.txt
and both document the version obtained by applying the little
patch given in the above (and again below).

So, the present kernel code is not according to specs and must be
regarded as buggy. The patch below, or something similar,
should be applied.

Andries

---
Specification in Documentation/sharedsubtree.txt:
See state diagram: unbindable should become private upon make-private.

Specification in mount(8):
... It's
also possible to set up uni-directional propagation (with --make-
slave), to make a mount point unavailable for --bind/--rbind (with
--make-unbindable), and to undo any of these (with --make-private).

Repeat of old fix-shared-subtrees-make-private.patch
(due to Dirk Gerrits, René Gabriëls, Peter Kooijmans):

--- pnode.old 2007-04-17 12:53:11.000000000 +0200
+++ pnode.c 2007-04-17 13:22:03.000000000 +0200
@@ -83,6 +83,8 @@
mnt->mnt_master = NULL;
if (type == MS_UNBINDABLE)
mnt->mnt_flags |= MNT_UNBINDABLE;
+ else
+ mnt->mnt_flags &= ~MNT_UNBINDABLE;
}
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-25 18:07    [W:0.512 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site