sched_show_task: fix unsafe usage of ->real_parent
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 <20b70f0af00562e63758b9ee42012ecc96c58590@redhat.com>
Cc: Aaron Tomlin <4ed61b0b61ab8b39dcdee4eca4730f0b305b3047@redhat.com>
Cc: Alexey Dobriyan <b99bff5923d24d2fb8e844db9dac7cd59203da1d@gmail.com>
Cc: "Eric W. Biederman" <8a741aa8cbd77ebc4a56ddb528ce9fd15d42f034@xmission.com>,
Cc: Sterling Alexander <9eb90039aece32f9874377e394d636d5e7a331fe@redhat.com>
Acked-by: Peter Zijlstra (Intel) <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Roland McGrath <0d270388f2f92757a5de0f4bd891d3b392c44c4f@hack.frob.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs