Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

make SysRq-T show all tasks again

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>

authored by

Ingo Molnar and committed by
Linus Torvalds
39bc89fd 20f09390

+3 -3
+2 -2
include/linux/sched.h
··· 196 196 extern cpumask_t nohz_cpu_mask; 197 197 198 198 /* 199 - * Only dump TASK_* tasks. (-1 for all tasks) 199 + * Only dump TASK_* tasks. (0 for all tasks) 200 200 */ 201 201 extern void show_state_filter(unsigned long state_filter); 202 202 203 203 static inline void show_state(void) 204 204 { 205 - show_state_filter(-1); 205 + show_state_filter(0); 206 206 } 207 207 208 208 extern void show_regs(struct pt_regs *);
+1 -1
kernel/sched.c
··· 4746 4746 * console might take alot of time: 4747 4747 */ 4748 4748 touch_nmi_watchdog(); 4749 - if (p->state & state_filter) 4749 + if (!state_filter || (p->state & state_filter)) 4750 4750 show_task(p); 4751 4751 } while_each_thread(g, p); 4752 4752