diff options
Diffstat (limited to 'security/tomoyo/realpath.c')
-rw-r--r-- | security/tomoyo/realpath.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c index ed8ccd680102..d1e05b047715 100644 --- a/security/tomoyo/realpath.c +++ b/security/tomoyo/realpath.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <net/sock.h> | 15 | #include <net/sock.h> |
16 | #include "common.h" | 16 | #include "common.h" |
17 | #include "../../fs/internal.h" | ||
17 | 18 | ||
18 | /** | 19 | /** |
19 | * tomoyo_encode: Convert binary string to ascii string. | 20 | * tomoyo_encode: Convert binary string to ascii string. |
@@ -127,10 +128,8 @@ char *tomoyo_realpath_from_path(struct path *path) | |||
127 | /* If we don't have a vfsmount, we can't calculate. */ | 128 | /* If we don't have a vfsmount, we can't calculate. */ |
128 | if (!path->mnt) | 129 | if (!path->mnt) |
129 | break; | 130 | break; |
130 | spin_lock(&dcache_lock); | ||
131 | /* go to whatever namespace root we are under */ | 131 | /* go to whatever namespace root we are under */ |
132 | pos = __d_path(path, &ns_root, buf, buf_len); | 132 | pos = __d_path(path, &ns_root, buf, buf_len); |
133 | spin_unlock(&dcache_lock); | ||
134 | /* Prepend "/proc" prefix if using internal proc vfs mount. */ | 133 | /* Prepend "/proc" prefix if using internal proc vfs mount. */ |
135 | if (!IS_ERR(pos) && (path->mnt->mnt_flags & MNT_INTERNAL) && | 134 | if (!IS_ERR(pos) && (path->mnt->mnt_flags & MNT_INTERNAL) && |
136 | (path->mnt->mnt_sb->s_magic == PROC_SUPER_MAGIC)) { | 135 | (path->mnt->mnt_sb->s_magic == PROC_SUPER_MAGIC)) { |