mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 07:06:45 +07:00
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 single bugfix to prevent a pinned thread which queues stomp machine work to be preempted by the stopper thread on its CPU which causes a live lock as it is unable to wake the second CPUs stopper thread" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: stop_machine: Atomically queue and wake stopper threads
This commit is contained in:
commit
2406fb8d94
@ -81,6 +81,7 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
|
||||
unsigned long flags;
|
||||
bool enabled;
|
||||
|
||||
preempt_disable();
|
||||
raw_spin_lock_irqsave(&stopper->lock, flags);
|
||||
enabled = stopper->enabled;
|
||||
if (enabled)
|
||||
@ -90,6 +91,7 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
|
||||
raw_spin_unlock_irqrestore(&stopper->lock, flags);
|
||||
|
||||
wake_up_q(&wakeq);
|
||||
preempt_enable();
|
||||
|
||||
return enabled;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user