Re: [PATCH 1/5] sched_show_task: fix unsafe usage of ->real_parent

2014-11-11 Thread Peter Zijlstra
On Mon, Nov 10, 2014 at 11:00:26PM +0100, Oleg Nesterov wrote: > 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 >

[PATCH 1/5] sched_show_task: fix unsafe usage of ->real_parent

2014-11-10 Thread Oleg Nesterov
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.