aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 13:29:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 13:29:59 -0400
commit84ed2da02f4cda6759880c87a213ee80c91ca3bd (patch)
treea13f3bb09c0efe805cf673b941cc87ca84b06ace /kernel
parentdaba2b314a43c53be61eb98e0e88b094398196f5 (diff)
parentbe6a2e4c46cc122ba9113ba569fbc50fad075fff (diff)
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fix from Thomas Gleixner: "A revert of a commit which pointelessly widened a preempt disabled section which in turn caused might_sleep() to trigger. The patch intended to prevent usage of smp_processor_id() in preemptible context, but the usage in that case is fine because the thread is pinned on a single cpu and therefore cannot be migrated off" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "sched/core: Do not use smp_processor_id() with preempt enabled in smpboot_thread_fn()"
Diffstat (limited to 'kernel')
-rw-r--r--kernel/smpboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/smpboot.c b/kernel/smpboot.c
index fc0d8270f69e..13bc43d1fb22 100644
--- a/kernel/smpboot.c
+++ b/kernel/smpboot.c
@@ -122,12 +122,12 @@ static int smpboot_thread_fn(void *data)
122 122
123 if (kthread_should_park()) { 123 if (kthread_should_park()) {
124 __set_current_state(TASK_RUNNING); 124 __set_current_state(TASK_RUNNING);
125 preempt_enable();
125 if (ht->park && td->status == HP_THREAD_ACTIVE) { 126 if (ht->park && td->status == HP_THREAD_ACTIVE) {
126 BUG_ON(td->cpu != smp_processor_id()); 127 BUG_ON(td->cpu != smp_processor_id());
127 ht->park(td->cpu); 128 ht->park(td->cpu);
128 td->status = HP_THREAD_PARKED; 129 td->status = HP_THREAD_PARKED;
129 } 130 }
130 preempt_enable();
131 kthread_parkme(); 131 kthread_parkme();
132 /* We might have been woken for stop */ 132 /* We might have been woken for stop */
133 continue; 133 continue;