sched: Add missing rcu_dereference() around ->real_parent usage

Wrap another ->real_parent dereference while under rcu_read_lock.

Signed-off-by: Kees Cook <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Glauber Costa <[email protected]>
Cc: Suresh Siddha <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
[ tidied up the changelog ]
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
Kees Cook 2011-12-15 08:49:18 -08:00 • committed by Ingo Molnar
commit 07cde2608a

View file

@ -4784,7 +4784,7 @@ void sched_show_task(struct task_struct *p)
free = stack_not_used(p);
#endif
printk(KERN_CONT "%5lu %5d %6d 0x%08lx\n", free,
task_pid_nr(p), task_pid_nr(p->real_parent),
task_pid_nr(p), task_pid_nr(rcu_dereference(p->real_parent)),
(unsigned long)task_thread_info(p)->flags);
show_stack(p, NULL);