Browse Source

tomoyo: add missing rcu_dereference()

Adds a missed rcu_dereference() around real_parent.

Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
Kees Cook 13 years ago
parent
commit
bb80d880ad
1 changed files with 1 additions and 1 deletions
  1. 1 1
      security/tomoyo/common.h

+ 1 - 1
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;
 }