public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] apparmor: add missing rcu_dereference()
@ 2011-12-09  0:25 Kees Cook
  2011-12-09  0:50 ` John Johansen
  0 siblings, 1 reply; 3+ messages in thread
From: Kees Cook @ 2011-12-09  0:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: John Johansen, James Morris, linux-security-module

Adds a missed rcu_dereference() around real_parent.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 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 96502b2..f3fafed 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) {
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-09  1:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-09  0:25 [PATCH] apparmor: add missing rcu_dereference() Kees Cook
2011-12-09  0:50 ` John Johansen
2011-12-09  1:09   ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox