projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e1295d
)
do_add_mount() should sanitize mnt_flags
author
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 16 Jan 2010 18:07:36 +0000
(13:07 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 16 Jan 2010 18:07:36 +0000
(13:07 -0500)
MNT_WRITE_HOLD shouldn't leak into new vfsmount and neither
should MNT_SHARED (the latter will be set properly, along with
the rest of shared-subtree data structures)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namespace.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/namespace.c
b/fs/namespace.c
index 779293e29b858f8813c0dcdb89bdba711069aa9a..c768f733c8d6585a87551190bdf1b71a14cab9fe 100644
(file)
--- a/
fs/namespace.c
+++ b/
fs/namespace.c
@@
-1671,6
+1671,8
@@
int do_add_mount(struct vfsmount *newmnt, struct path *path,
{
int err;
+ mnt_flags &= ~(MNT_SHARED | MNT_WRITE_HOLD);
+
down_write(&namespace_sem);
/* Something was mounted here while we slept */
while (d_mountpoint(path->dentry) &&