Skip to contentSkip to conversation

tomoyo: add missing rcu_dereference()

PATCH In review Kees Cook 2 participants 2 messages Dec 9, 2011 – Dec 12, 2011

Subsystems (2)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 tomoyo: add missing rcu_dereference()

Adds a missed rcu_dereference() around real_parent.

---
 security/tomoyo/common.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
security/tomoyo/common.h +1 -1
index ed311d7..cb9f5c2 100644
@@ -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;
 }
Signature · 1 line
1.7.0.4