提交 27d55f1f 编写于 作者: A Al Viro

do_add_mount() should sanitize mnt_flags

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: NAl Viro <viro@zeniv.linux.org.uk>
上级 7e1295d9
......@@ -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) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册