[PATCH] smp_call_function_single() check that local interrupts are enabled
[sfrench/cifs-2.6.git] / arch / i386 / kernel / smp.c
index 31e5c6573aae450b3a1f94fe7129de94fc4ea26e..9827cf927ecb2c49223d6bc856a15c48151a5e06 100644 (file)
@@ -699,6 +699,10 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
                put_cpu();
                return -EBUSY;
        }
+
+       /* Can deadlock when called with interrupts disabled */
+       WARN_ON(irqs_disabled());
+
        spin_lock_bh(&call_lock);
        __smp_call_function_single(cpu, func, info, nonatomic, wait);
        spin_unlock_bh(&call_lock);