Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sched-urgent-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fix from Ingo Molnar:
"Fix a sleeping-while-atomic bug caused by a recent optimization
utilizing static keys that didn't consider that the
static_key_disable() call could be triggered in atomic context.

Revert the optimization"

* tag 'sched-urgent-2025-03-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/clock: Don't define sched_clock_irqtime as static key

+6 -6
+4 -4
kernel/sched/cputime.c
··· 9 9 10 10 #ifdef CONFIG_IRQ_TIME_ACCOUNTING 11 11 12 - DEFINE_STATIC_KEY_FALSE(sched_clock_irqtime); 13 - 14 12 /* 15 13 * There are no locks covering percpu hardirq/softirq time. 16 14 * They are only modified in vtime_account, on corresponding CPU ··· 22 24 */ 23 25 DEFINE_PER_CPU(struct irqtime, cpu_irqtime); 24 26 27 + int sched_clock_irqtime; 28 + 25 29 void enable_sched_clock_irqtime(void) 26 30 { 27 - static_branch_enable(&sched_clock_irqtime); 31 + sched_clock_irqtime = 1; 28 32 } 29 33 30 34 void disable_sched_clock_irqtime(void) 31 35 { 32 - static_branch_disable(&sched_clock_irqtime); 36 + sched_clock_irqtime = 0; 33 37 } 34 38 35 39 static void irqtime_account_delta(struct irqtime *irqtime, u64 delta,
+2 -2
kernel/sched/sched.h
··· 3259 3259 }; 3260 3260 3261 3261 DECLARE_PER_CPU(struct irqtime, cpu_irqtime); 3262 - DECLARE_STATIC_KEY_FALSE(sched_clock_irqtime); 3262 + extern int sched_clock_irqtime; 3263 3263 3264 3264 static inline int irqtime_enabled(void) 3265 3265 { 3266 - return static_branch_likely(&sched_clock_irqtime); 3266 + return sched_clock_irqtime; 3267 3267 } 3268 3268 3269 3269 /*