summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2010-01-29 15:38:21 -0800
committerThomas Gleixner <tglx@linutronix.de>2010-04-27 17:32:32 +0200
commitd4fe09131b66c5a7176a5dbfc9bd1ef6939643e8 (patch)
tree1b2293bcc65f2c97c7a2b5a27d5d55eb7a195bd6 /security
parent5c0eb5cec064ce26ffcd0cdd684c9b6dd7c9074e (diff)
downloadlwn-d4fe09131b66c5a7176a5dbfc9bd1ef6939643e8.tar.gz
lwn-d4fe09131b66c5a7176a5dbfc9bd1ef6939643e8.zip
fs-dcache-scale-d_unhashed
Protect d_unhashed(dentry) condition with d_lock. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'security')
-rw-r--r--security/tomoyo/realpath.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c
index c5c3c1669cab..776146b68e57 100644
--- a/security/tomoyo/realpath.c
+++ b/security/tomoyo/realpath.c
@@ -105,8 +105,10 @@ int tomoyo_realpath_from_path2(struct path *path, char *newname,
ns_root.dentry = dget(ns_root.mnt->mnt_root);
vfsmount_read_unlock();
spin_lock(&dcache_lock);
+ vfsmount_read_lock();
tmp = ns_root;
sp = __d_path(path, &tmp, newname, newname_len);
+ vfsmount_read_unlock();
spin_unlock(&dcache_lock);
path_put(&root);
path_put(&ns_root);