Commit 2053c472 authored by Kees Cook's avatar Kees Cook Committed by James Morris

apparmor: add missing rcu_dereference()

Adds a missed rcu_dereference() around real_parent.
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Acked-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 143b01d3
...@@ -133,7 +133,7 @@ static void audit_pre(struct audit_buffer *ab, void *ca) ...@@ -133,7 +133,7 @@ static void audit_pre(struct audit_buffer *ab, void *ca)
struct aa_profile *profile = sa->aad.profile; struct aa_profile *profile = sa->aad.profile;
pid_t pid; pid_t pid;
rcu_read_lock(); rcu_read_lock();
pid = tsk->real_parent->pid; pid = rcu_dereference(tsk->real_parent)->pid;
rcu_read_unlock(); rcu_read_unlock();
audit_log_format(ab, " parent=%d", pid); audit_log_format(ab, " parent=%d", pid);
if (profile->ns != root_ns) { if (profile->ns != root_ns) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment