spin_lock_irq debugging
PATCH 1/1 spin_lock_irq debugging
Of course the real problem is the corresponding spin_unlock_irq enabling local irqs when they should have been left disabled, but this is easier to check for. Your logs will fill up.
include/linux/spinlock.h +4 -0
@@ -261,6 +261,10 @@#define spin_lock_irq (lock) \ do { \ + if (unlikely(irqs_disabled())) { \ + printk(KERN_ERR "bad: spin_lock_irq with irqs disabled!\n"); \ + dump_stack(); \ + } \ local_irq_disable(); \ preempt_disable(); \ _raw_spin_lock(lock); \