Skip to content

Commit cc650a7

Browse files
Kyle McMartinKyle McMartin
authored andcommitted
[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 <kyle@parisc-linux.org>
1 parent 376e210 commit cc650a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/parisc/kernel/process.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ get_wchan(struct task_struct *p)
381381
struct unwind_frame_info info;
382382
unsigned long ip;
383383
int count = 0;
384+
385+
if (!p || p == current || p->state == TASK_RUNNING)
386+
return 0;
387+
384388
/*
385389
* These bracket the sleeping functions..
386390
*/

0 commit comments

Comments
 (0)