[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 8 Dec 2011 16:30:42 -0800
From: Kees Cook <keescook@...omium.org>
To: linux-kernel@...r.kernel.org
Cc: Kentaro Takeda <takedakn@...data.co.jp>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
James Morris <jmorris@...ei.org>,
linux-security-module@...r.kernel.org
Subject: [PATCH] tomoyo: add missing rcu_dereference()
Adds a missed rcu_dereference() around real_parent.
Signed-off-by: Kees Cook <keescook@...omium.org>
---
security/tomoyo/common.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h
index ed311d7..cb9f5c2 100644
--- a/security/tomoyo/common.h
+++ b/security/tomoyo/common.h
@@ -1122,7 +1122,7 @@ static inline pid_t tomoyo_sys_getppid(void)
{
pid_t pid;
rcu_read_lock();
- pid = task_tgid_vnr(current->real_parent);
+ pid = task_tgid_vnr(rcu_dereference(current->real_parent));
rcu_read_unlock();
return pid;
}
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists