From: Oleg Nesterov Date: Wed, 10 Dec 2014 23:45:21 +0000 (-0800) Subject: sched_show_task: fix unsafe usage of ->real_parent X-Git-Tag: omap-for-v3.20/drop-legacy-3517~139^2~101 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a90e984c8a660dd58894a68cc5d9d5cd457d5796;p=pandora-kernel.git sched_show_task: fix unsafe usage of ->real_parent rcu_read_lock() can not protect p->real_parent if release_task(p) was already called, change sched_show_task() to check pis_alive() like other users do. Note: we need some helpers to cleanup the code like this. And it seems that that the usage of cpu_curr(cpu) in dump_cpu_task() is not safe too. Signed-off-by: Oleg Nesterov Cc: Aaron Tomlin Cc: Alexey Dobriyan Cc: "Eric W. Biederman" , Cc: Sterling Alexander Acked-by: Peter Zijlstra (Intel) Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed