Skip to content

Commit a80712b

Browse files
author
Frederic Weisbecker
committed
rcu/tasks-trace: Handle new PF_IDLE semantics
The commit: cff9b23 ("kernel/sched: Modify initial boot task idle setup") has changed the semantics of what is to be considered an idle task in such a way that the idle task of an offline CPU may not carry the PF_IDLE flag anymore. However RCU-tasks-trace tests the opposite assertion, still assuming that idle tasks carry the PF_IDLE flag during their whole lifecycle. Remove this assumption to avoid spurious warnings but keep the initial test verifying that the idle task is the current task on any offline CPU. Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Fixes: cff9b23 ("kernel/sched: Modify initial boot task idle setup") Suggested-by: Joel Fernandes <joel@joelfernandes.org> Suggested-by: Paul E . McKenney" <paulmck@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
1 parent 9715ed5 commit a80712b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/tasks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ static int trc_inspect_reader(struct task_struct *t, void *bhp_in)
15511551
} else {
15521552
// The task is not running, so C-language access is safe.
15531553
nesting = t->trc_reader_nesting;
1554-
WARN_ON_ONCE(ofl && task_curr(t) && !is_idle_task(t));
1554+
WARN_ON_ONCE(ofl && task_curr(t) && (t != idle_task(task_cpu(t))));
15551555
if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB) && ofl)
15561556
n_heavy_reader_ofl_updates++;
15571557
}

0 commit comments

Comments
 (0)