summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2008-04-24 16:02:26 +0300
committerAvi Kivity <avi@qumranet.com>2008-04-24 16:02:26 +0300
commitda00aa5090cf2de4259960ea659ac783bd65a041 (patch)
tree4447f6bae844d42ab85d2564d4dde20765cddb90 /kernel
parentd94f05cf9d1ade6543a9653c0952db284113b155 (diff)
kvm: external module: warn if the smp compat functions are called with irqs disabled
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/external-module-compat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/external-module-compat.c b/kernel/external-module-compat.c
index f0f5ce7c..0b5fd413 100644
--- a/kernel/external-module-compat.c
+++ b/kernel/external-module-compat.c
@@ -31,6 +31,7 @@ int kvm_smp_call_function_single(int cpu, void (*func)(void *info),
struct scfs_thunk_info thunk;
this_cpu = get_cpu();
+ WARN_ON(irqs_disabled());
if (cpu == this_cpu) {
r = 0;
local_irq_disable();
@@ -63,6 +64,7 @@ int kvm_smp_call_function_single(int cpu, void (*func)(void *info),
int this_cpu, r;
this_cpu = get_cpu();
+ WARN_ON(irqs_disabled());
if (cpu == this_cpu) {
r = 0;
local_irq_disable();
@@ -151,6 +153,7 @@ int kvm_smp_call_function_mask(cpumask_t mask,
int me;
me = get_cpu();
+ WARN_ON(irqs_disabled());
allbutself = cpu_online_map;
cpu_clear(me, allbutself);