Skip to content

Commit d39ec8f

Browse files
Neeraj Upadhyaypaulmckrcu
authored andcommitted
rcu-tasks: Correct comparisons for CPU numbers in show_stalled_task_trace
Valid CPU numbers can be zero or greater, but the checks for ->trc_ipi_to_cpu and tick_nohz_full_cpu()'s argument are for strictly greater than. This commit therefore corrects the check for no_hz_full cpu in show_stalled_task_trace() so as to include cpu 0. Signed-off-by: Neeraj Upadhyay <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 8940117 commit d39ec8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/rcu/tasks.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,9 +1084,9 @@ static void show_stalled_task_trace(struct task_struct *t, bool *firstreport)
10841084
cpu = task_cpu(t);
10851085
pr_alert("P%d: %c%c%c nesting: %d%c cpu: %d\n",
10861086
t->pid,
1087-
".I"[READ_ONCE(t->trc_ipi_to_cpu) > 0],
1087+
".I"[READ_ONCE(t->trc_ipi_to_cpu) >= 0],
10881088
".i"[is_idle_task(t)],
1089-
".N"[cpu > 0 && tick_nohz_full_cpu(cpu)],
1089+
".N"[cpu >= 0 && tick_nohz_full_cpu(cpu)],
10901090
READ_ONCE(t->trc_reader_nesting),
10911091
" N"[!!READ_ONCE(t->trc_reader_special.b.need_qs)],
10921092
cpu);

0 commit comments

Comments
 (0)