projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d59dc7b
)
sched/core: Do not use smp_processor_id() with preempt enabled in smpboot_thread_fn()
author
Con Kolivas
<
[email protected]
>
Tue, 13 Sep 2016 06:27:05 +0000
(16:27 +1000)
committer
Ingo Molnar
<
[email protected]
>
Thu, 22 Sep 2016 10:28:00 +0000
(12:28 +0200)
We should not be using smp_processor_id() with preempt enabled.
Bug identified and fix provided by Alfred Chen.
Reported-by: Alfred Chen <
[email protected]
>
Signed-off-by: Con Kolivas <
[email protected]
>
Cc: Alfred Chen <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Link:
http://lkml.kernel.org/r/2042051.3vvUWIM0vs@hex
Signed-off-by: Ingo Molnar <
[email protected]
>
kernel/smpboot.c
patch
|
blob
|
history
diff --git
a/kernel/smpboot.c
b/kernel/smpboot.c
index 13bc43d1fb227f8ee0c55a411460200a2ac3b067..fc0d8270f69ed412947df06890f80602f68f6ff6 100644
(file)
--- 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;