Commit 44672e4fbd40e2dda8bbce7d0f71d24dbfc7e00e
Committed by
Al Viro
1 parent
baa0389073
Exists in
master
and in
7 other branches
apparmor: use task path helpers
apparmor: use task path helpers Signed-off-by: Nick Piggin <npiggin@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 1 changed file with 2 additions and 7 deletions Side-by-side Diff
security/apparmor/path.c
... | ... | @@ -62,19 +62,14 @@ |
62 | 62 | int deleted, connected; |
63 | 63 | int error = 0; |
64 | 64 | |
65 | - /* Get the root we want to resolve too */ | |
65 | + /* Get the root we want to resolve too, released below */ | |
66 | 66 | if (flags & PATH_CHROOT_REL) { |
67 | 67 | /* resolve paths relative to chroot */ |
68 | - read_lock(¤t->fs->lock); | |
69 | - root = current->fs->root; | |
70 | - /* released below */ | |
71 | - path_get(&root); | |
72 | - read_unlock(¤t->fs->lock); | |
68 | + get_fs_root(current->fs, &root); | |
73 | 69 | } else { |
74 | 70 | /* resolve paths relative to namespace */ |
75 | 71 | root.mnt = current->nsproxy->mnt_ns->root; |
76 | 72 | root.dentry = root.mnt->mnt_root; |
77 | - /* released below */ | |
78 | 73 | path_get(&root); |
79 | 74 | } |
80 | 75 |