1
0
Fork 0

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>
hifive-unleashed-5.1
Kees Cook 2011-12-08 16:25:48 -08:00 committed by James Morris
parent 143b01d332
commit 2053c4727c
1 changed files with 1 additions and 1 deletions

View File

@ -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) {