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 branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull smp fix from Thomas Gleixner:
"Add warnings to the smp function calls so callers from wrong contexts
get detected"

* 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
smp: Warn on function calls from softirq context

+16
+16
kernel/smp.c
··· 291 291 WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled() 292 292 && !oops_in_progress); 293 293 294 + /* 295 + * When @wait we can deadlock when we interrupt between llist_add() and 296 + * arch_send_call_function_ipi*(); when !@wait we can deadlock due to 297 + * csd_lock() on because the interrupt context uses the same csd 298 + * storage. 299 + */ 300 + WARN_ON_ONCE(!in_task()); 301 + 294 302 csd = &csd_stack; 295 303 if (!wait) { 296 304 csd = this_cpu_ptr(&csd_data); ··· 423 415 */ 424 416 WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled() 425 417 && !oops_in_progress && !early_boot_irqs_disabled); 418 + 419 + /* 420 + * When @wait we can deadlock when we interrupt between llist_add() and 421 + * arch_send_call_function_ipi*(); when !@wait we can deadlock due to 422 + * csd_lock() on because the interrupt context uses the same csd 423 + * storage. 424 + */ 425 + WARN_ON_ONCE(!in_task()); 426 426 427 427 /* Try to fastpath. So, what's a CPU they want? Ignoring this one. */ 428 428 cpu = cpumask_first_and(mask, cpu_online_mask);