[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-4fa5cd5245b627db88c9ca08ae442373b02596b4@git.kernel.org>
Date: Thu, 22 Sep 2016 04:58:39 -0700
From: tip-bot for Con Kolivas <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, linux-kernel@...r.kernel.org, mingo@...nel.org,
hpa@...or.com, peterz@...radead.org, kernel@...ivas.org,
cchalpha@...il.com
Subject: [tip:sched/core] sched/core: Do not use smp_processor_id() with
preempt enabled in smpboot_thread_fn()
Commit-ID: 4fa5cd5245b627db88c9ca08ae442373b02596b4
Gitweb: http://git.kernel.org/tip/4fa5cd5245b627db88c9ca08ae442373b02596b4
Author: Con Kolivas <kernel@...ivas.org>
AuthorDate: Tue, 13 Sep 2016 16:27:05 +1000
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 22 Sep 2016 12:28:00 +0200
sched/core: Do not use smp_processor_id() with preempt enabled in smpboot_thread_fn()
We should not be using smp_processor_id() with preempt enabled.
Bug identified and fix provided by Alfred Chen.
Reported-by: Alfred Chen <cchalpha@...il.com>
Signed-off-by: Con Kolivas <kernel@...ivas.org>
Cc: Alfred Chen <cchalpha@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/2042051.3vvUWIM0vs@hex
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/smpboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/smpboot.c b/kernel/smpboot.c
index 13bc43d..fc0d8270 100644
--- a/kernel/smpboot.c
+++ b/kernel/smpboot.c
@@ -122,12 +122,12 @@ static int smpboot_thread_fn(void *data)
if (kthread_should_park()) {
__set_current_state(TASK_RUNNING);
- preempt_enable();
if (ht->park && td->status == HP_THREAD_ACTIVE) {
BUG_ON(td->cpu != smp_processor_id());
ht->park(td->cpu);
td->status = HP_THREAD_PARKED;
}
+ preempt_enable();
kthread_parkme();
/* We might have been woken for stop */
continue;
Powered by blists - more mailing lists