From: Kyle McMartin Date: Wed, 30 May 2007 06:36:00 +0000 (-0400) Subject: [PARISC] be more defensive in process.c::get_wchan X-Git-Tag: v2.6.22-rc5~36^2~3 X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=commitdiff_plain;h=cc650a7a9f5ebc3f9290a8e20e3f55b4f52f849e;ds=sidebyside [PARISC] be more defensive in process.c::get_wchan While debugging, I noticed we don't check the task_struct arg passed to get_wchan, whereas everyone else does. Signed-off-by: Kyle McMartin --- diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 0dd3847f494c..355664812b83 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -381,6 +381,10 @@ get_wchan(struct task_struct *p) struct unwind_frame_info info; unsigned long ip; int count = 0; + + if (!p || p == current || p->state == TASK_RUNNING) + return 0; + /* * These bracket the sleeping functions.. */