diff options
author | Kees Cook <keescook@chromium.org> | 2011-12-09 01:25:48 +0100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-12-09 02:08:41 +0100 |
commit | 2053c4727c5a891bf182397e425b6cb87b2ae613 (patch) | |
tree | 531090ac23e90b4aa64416a62c4625ffffec181f | |
parent | evm: prevent racing during tfm allocation (diff) | |
download | linux-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>
-rw-r--r-- | security/apparmor/audit.c | 2 |
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) { |