Skip to content

Commit

Permalink
apparmor: add missing rcu_dereference()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kees Cook authored and James Morris committed Dec 9, 2011
1 parent 143b01d commit 2053c47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/apparmor/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2053c47

Please sign in to comment.