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:
9b6e310
)
may_umount() needs namespace_sem
author
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 16 Jan 2010 17:56:08 +0000
(12:56 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 16 Jan 2010 17:56:08 +0000
(12:56 -0500)
otherwise it races with clone_mnt() changing mnt_share/mnt_slaves
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 7d70d63ceb2948c6b8e25ef7628314a4c0eab3b8..461090a57b334c89654734a59a3782aac8f29caa 100644
(file)
--- a/
fs/namespace.c
+++ b/
fs/namespace.c
@@
-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;
}