summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2011-12-09 01:25:48 +0100
committerJames Morris <jmorris@namei.org>2011-12-09 02:08:41 +0100
commit2053c4727c5a891bf182397e425b6cb87b2ae613 (patch)
tree531090ac23e90b4aa64416a62c4625ffffec181f /security
parentevm: prevent racing during tfm allocation (diff)
downloadlinux-2053c4727c5a891bf182397e425b6cb87b2ae613.tar.xz
linux-2053c4727c5a891bf182397e425b6cb87b2ae613.zip
apparmor: add missing rcu_dereference()
Adds a missed rcu_dereference() around real_parent. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: John Johansen <john.johansen@canonical.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c
index 96502b22b268..f3fafedd798a 100644
--- a/security/apparmor/audit.c
+++ b/security/apparmor/audit.c
@@ -133,7 +133,7 @@ static void audit_pre(struct audit_buffer *ab, void *ca)
struct aa_profile *profile = sa->aad.profile;
pid_t pid;
rcu_read_lock();
- pid = tsk->real_parent->pid;
+ pid = rcu_dereference(tsk->real_parent)->pid;
rcu_read_unlock();
audit_log_format(ab, " parent=%d", pid);
if (profile->ns != root_ns) {