Skip to content

Commit bb80d88

Browse files
keesxjamesmorris
authored andcommitted
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>
1 parent 2053c47 commit bb80d88

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎security/tomoyo/common.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ static inline pid_t tomoyo_sys_getppid(void)
11221122
{
11231123
pid_t pid;
11241124
rcu_read_lock();
1125-
pid = task_tgid_vnr(current->real_parent);
1125+
pid = task_tgid_vnr(rcu_dereference(current->real_parent));
11261126
rcu_read_unlock();
11271127
return pid;
11281128
}

0 commit comments

Comments
 (0)