[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200117174131.893547195@goodmis.org>
Date: Fri, 17 Jan 2020 12:41:41 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org,
linux-rt-users <linux-rt-users@...r.kernel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Carsten Emde <C.Emde@...dl.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
John Kacur <jkacur@...hat.com>,
Julia Cartwright <julia@...com>,
Daniel Wagner <wagi@...om.org>,
Tom Zanussi <zanussi@...nel.org>,
Daniel Wagner <dwagner@...e.de>
Subject: [PATCH RT 30/32] lib/smp_processor_id: Adjust check_preemption_disabled()
4.19.94-rt39-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Daniel Wagner <dwagner@...e.de>
[ Upstream commit af3c1c5fdf177870fb5e6e16b24e374696ab28f5 ]
The current->migrate_disable counter is not always defined leading to
build failures with DEBUG_PREEMPT && !PREEMPT_RT_BASE.
Restrict the access to ->migrate_disable to same set where
->migrate_disable is modified.
Signed-off-by: Daniel Wagner <dwagner@...e.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
[bigeasy: adjust condition + description]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
---
lib/smp_processor_id.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index 0c80992aa337..2e7398534b66 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
@@ -22,8 +22,10 @@ notrace static unsigned int check_preemption_disabled(const char *what1,
* Kernel threads bound to a single CPU can safely use
* smp_processor_id():
*/
+#if defined(CONFIG_PREEMPT_RT_BASE) && (defined(CONFIG_SMP) || defined(CONFIG_SCHED_DEBUG))
if (current->migrate_disable)
goto out;
+#endif
if (current->nr_cpus_allowed == 1)
goto out;
--
2.24.1
Powered by blists - more mailing lists