提交 8ad08d8a 编写于 作者: A Al Viro

may_umount() needs namespace_sem

otherwise it races with clone_mnt() changing mnt_share/mnt_slaves
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 9b6e3102
......@@ -965,10 +965,12 @@ EXPORT_SYMBOL(may_umount_tree);
int may_umount(struct vfsmount *mnt)
{
int ret = 1;
down_read(&namespace_sem);
spin_lock(&vfsmount_lock);
if (propagate_mount_busy(mnt, 2))
ret = 0;
spin_unlock(&vfsmount_lock);
up_read(&namespace_sem);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册