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:
8ad08d8
)
attach_recursive_mnt() needs to hold vfsmount_lock over set_mnt_shared()
author
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 16 Jan 2010 17:57:40 +0000
(12:57 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 16 Jan 2010 17:57:40 +0000
(12:57 -0500)
race in mnt_flags update
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 461090a57b334c89654734a59a3782aac8f29caa..4de493ea67cfba31a7ca81cfce7ce5818d374e13 100644
(file)
--- a/
fs/namespace.c
+++ b/
fs/namespace.c
@@
-1354,12
+1354,12
@@
static int attach_recursive_mnt(struct vfsmount *source_mnt,
if (err)
goto out_cleanup_ids;
+ spin_lock(&vfsmount_lock);
+
if (IS_MNT_SHARED(dest_mnt)) {
for (p = source_mnt; p; p = next_mnt(p, source_mnt))
set_mnt_shared(p);
}
-
- spin_lock(&vfsmount_lock);
if (parent_path) {
detach_mnt(source_mnt, parent_path);
attach_mnt(source_mnt, path);