]> err.no Git - linux-2.6/commitdiff
make SysRq-T show all tasks again
authorIngo Molnar <mingo@elte.hu>
Thu, 26 Apr 2007 03:50:03 +0000 (20:50 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 27 Apr 2007 17:46:51 +0000 (10:46 -0700)
show_state() (SysRq-T) developed the buggy habbit of not showing
TASK_RUNNING tasks.  This was due to the mistaken belief that state_filter
== -1 would be a pass-through filter - while in reality it did not let
TASK_RUNNING == 0 p->state values through.

Fix this by restoring the original '!state_filter means all tasks'
special-case i had in the original version.  Test-built and test-booted on
i686, SysRq-T now works as intended.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/sched.h
kernel/sched.c

index 49fe2997a0168631731f7dbefcbd9e5ee7547161..a1707583de495993d152b1e5b35b90643660ea98 100644 (file)
@@ -196,13 +196,13 @@ extern void init_idle(struct task_struct *idle, int cpu);
 extern cpumask_t nohz_cpu_mask;
 
 /*
- * Only dump TASK_* tasks. (-1 for all tasks)
+ * Only dump TASK_* tasks. (0 for all tasks)
  */
 extern void show_state_filter(unsigned long state_filter);
 
 static inline void show_state(void)
 {
-       show_state_filter(-1);
+       show_state_filter(0);
 }
 
 extern void show_regs(struct pt_regs *);
index b9a6837301482270dc7438a3df3539b9ac835f94..960d7c5fca39753b61a404bbbdbef1543f5807cc 100644 (file)
@@ -4746,7 +4746,7 @@ void show_state_filter(unsigned long state_filter)
                 * console might take alot of time:
                 */
                touch_nmi_watchdog();
-               if (p->state & state_filter)
+               if (!state_filter || (p->state & state_filter))
                        show_task(p);
        } while_each_thread(g, p);