From: Kees Cook Date: Fri, 9 Dec 2011 00:25:48 +0000 (-0800) Subject: apparmor: add missing rcu_dereference() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2053c4727c5a891bf182397e425b6cb87b2ae613;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git apparmor: add missing rcu_dereference() Adds a missed rcu_dereference() around real_parent. Signed-off-by: Kees Cook Acked-by: John Johansen Signed-off-by: James Morris --- 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) {