Message ID | 20220107021502.1121597-3-lgoncalv@redhat.com |
---|---|
State | New |
Headers | show |
Series | Linux v5.10.90-rt61-rc1 | expand |
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index dbf585cf4b9f8..971d8acceaecb 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -51,7 +51,11 @@ static bool stop_machine_initialized = false; void print_stop_info(const char *log_lvl, struct task_struct *task) { - struct cpu_stopper *stopper = this_cpu_ptr(&cpu_stopper); + /* + * If @task is a stopper task, it cannot migrate and task_cpu() is + * stable. + */ + struct cpu_stopper *stopper = per_cpu_ptr(&cpu_stopper, task_cpu(task)); if (task != stopper->thread) return;