diff options
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 56c9b79772bd..816c17203c16 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4508,9 +4508,10 @@ void sched_show_task(struct task_struct *p) { unsigned long free = 0; int ppid; - unsigned state; + unsigned long state = p->state; - state = p->state ? __ffs(p->state) + 1 : 0; + if (state) + state = __ffs(state) + 1; printk(KERN_INFO "%-15.15s %c", p->comm, state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?'); #if BITS_PER_LONG == 32 |