Merge branches 'release' and 'dock' into release
[sfrench/cifs-2.6.git] / arch / parisc / kernel / process.c
index 0dd3847f494c390f78563ea2c450d7e90cfa918d..b80e02a4d81de3d193ec1faae269b7614a783cf1 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/fs.h>
 #include <linux/module.h>
 #include <linux/personality.h>
 #include <linux/ptrace.h>
@@ -381,6 +382,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..
         */