[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20211217103209.1122679-2-bigeasy@linutronix.de>
Date: Fri, 17 Dec 2021 11:32:08 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: fcarli@...il.com
Cc: linux-kernel@...r.kernel.org,
"Luis Claudio R . Goncalves" <lgoncalv@...hat.com>,
stable-rt@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [PATCH 1/2] stop_machine: Remove this_cpu_ptr() from print_stop_info().
This aligns the patch ("stop_machine: Add function and caller debug
info) with commit
a8b62fd085050 ("stop_machine: Add function and caller debug info")
that was merged upstream and is slightly different.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
---
kernel/stop_machine.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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;
--
2.34.1
Powered by blists - more mailing lists