projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
376e210
)
[PARISC] be more defensive in process.c::get_wchan
author
Kyle McMartin
<kyle@parisc-linux.org>
Wed, 30 May 2007 06:36:00 +0000
(
02:36
-0400)
committer
Kyle McMartin
<kyle@minerva.i.cabal.ca>
Wed, 30 May 2007 06:36:00 +0000
(
02:36
-0400)
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 <kyle@parisc-linux.org>
arch/parisc/kernel/process.c
patch
|
blob
|
history
diff --git
a/arch/parisc/kernel/process.c
b/arch/parisc/kernel/process.c
index 0dd3847f494c390f78563ea2c450d7e90cfa918d..355664812b8319e1d0c9b01115fd4dbe162f8dc2 100644
(file)
--- 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..
*/