diff options
Diffstat (limited to 'kernel/smp.c')
-rw-r--r-- | kernel/smp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index 7ad2262d2eca..858baac568ee 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/rcupdate.h> | 6 | #include <linux/rcupdate.h> |
7 | #include <linux/rculist.h> | 7 | #include <linux/rculist.h> |
8 | #include <linux/kernel.h> | ||
8 | #include <linux/module.h> | 9 | #include <linux/module.h> |
9 | #include <linux/percpu.h> | 10 | #include <linux/percpu.h> |
10 | #include <linux/init.h> | 11 | #include <linux/init.h> |
@@ -285,7 +286,7 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, | |||
285 | this_cpu = get_cpu(); | 286 | this_cpu = get_cpu(); |
286 | 287 | ||
287 | /* Can deadlock when called with interrupts disabled */ | 288 | /* Can deadlock when called with interrupts disabled */ |
288 | WARN_ON(irqs_disabled()); | 289 | WARN_ON_ONCE(irqs_disabled() && !oops_in_progress); |
289 | 290 | ||
290 | if (cpu == this_cpu) { | 291 | if (cpu == this_cpu) { |
291 | local_irq_save(flags); | 292 | local_irq_save(flags); |
@@ -329,7 +330,7 @@ void __smp_call_function_single(int cpu, struct call_single_data *data, | |||
329 | csd_lock(data); | 330 | csd_lock(data); |
330 | 331 | ||
331 | /* Can deadlock when called with interrupts disabled */ | 332 | /* Can deadlock when called with interrupts disabled */ |
332 | WARN_ON(wait && irqs_disabled()); | 333 | WARN_ON_ONCE(wait && irqs_disabled() && !oops_in_progress); |
333 | 334 | ||
334 | generic_exec_single(cpu, data, wait); | 335 | generic_exec_single(cpu, data, wait); |
335 | } | 336 | } |
@@ -365,7 +366,7 @@ void smp_call_function_many(const struct cpumask *mask, | |||
365 | int cpu, next_cpu, this_cpu = smp_processor_id(); | 366 | int cpu, next_cpu, this_cpu = smp_processor_id(); |
366 | 367 | ||
367 | /* Can deadlock when called with interrupts disabled */ | 368 | /* Can deadlock when called with interrupts disabled */ |
368 | WARN_ON(irqs_disabled()); | 369 | WARN_ON_ONCE(irqs_disabled() && !oops_in_progress); |
369 | 370 | ||
370 | /* So, what's a CPU they want? Ignoring this one. */ | 371 | /* So, what's a CPU they want? Ignoring this one. */ |
371 | cpu = cpumask_first_and(mask, cpu_online_mask); | 372 | cpu = cpumask_first_and(mask, cpu_online_mask); |