summaryrefslogtreecommitdiffstats
path: root/security/apparmor
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2011-12-08 16:25:48 -0800
committerJames Morris <jmorris@namei.org>2011-12-09 12:08:41 +1100
commit2053c4727c5a891bf182397e425b6cb87b2ae613 (patch)
tree531090ac23e90b4aa64416a62c4625ffffec181f /security/apparmor
parent143b01d33221e4937d3930e6bb2b63d70b7c7a65 (diff)
downloadop-kernel-dev-2053c4727c5a891bf182397e425b6cb87b2ae613.zip
op-kernel-dev-2053c4727c5a891bf182397e425b6cb87b2ae613.tar.gz
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/apparmor')
-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 96502b2..f3fafed 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) {
OpenPOWER on IntegriCloud