diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-02-28 17:00:16 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-02-28 17:00:16 -0800 |
commit | d203484f2556f47a435cda36ceb9dd83adc9056e (patch) | |
tree | 04de1938e3abde1fd06c43c508337fd4fbcfc269 /kernel | |
parent | 766331f2860b08695418109582c94e98cc3528fe (diff) | |
parent | 82c387ef7568c0d96a918a5a78d9cad6256cfa15 (diff) | |
download | linux-d203484f2556f47a435cda36ceb9dd83adc9056e.tar.gz linux-d203484f2556f47a435cda36ceb9dd83adc9056e.tar.bz2 linux-d203484f2556f47a435cda36ceb9dd83adc9056e.zip |
Merge tag 'sched-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fix from Ingo Molnar:
"Prevent cond_resched() based preemption when interrupts are disabled,
on PREEMPT_NONE and PREEMPT_VOLUNTARY kernels"
* tag 'sched-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/core: Prevent rescheduling when interrupts are disabled
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 9aecd914ac69..67189907214d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7285,7 +7285,7 @@ out_unlock: #if !defined(CONFIG_PREEMPTION) || defined(CONFIG_PREEMPT_DYNAMIC) int __sched __cond_resched(void) { - if (should_resched(0)) { + if (should_resched(0) && !irqs_disabled()) { preempt_schedule_common(); return 1; } |