[PARISC] be more defensive in process.c::get_wchan
[sfrench/cifs-2.6.git] / arch / parisc / kernel / process.c
index 0dd3847f494c390f78563ea2c450d7e90cfa918d..355664812b8319e1d0c9b01115fd4dbe162f8dc2 100644 (file)
@@ -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..
         */