From 5f0028625b529f647e747d043ebde087be60e5b7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 24 Feb 2010 17:28:10 +0100 Subject: kvm: make_all_cpus_request() needs preempt_disable() on RT smp_call_function_many() needs to be called with preemption disabled, but on RT spin_lock(&kvm->requests_lock) is not doing that. Explicitely disable preemption on RT for the smp_call_function_many() call. Signed-off-by: Thomas Gleixner --- virt/kvm/kvm_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index a51ba60a78b1..6d0e484b40f3 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -145,12 +145,14 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req) if (cpus != NULL && cpu != -1 && cpu != me) cpumask_set_cpu(cpu, cpus); } + preempt_disable_rt(); if (unlikely(cpus == NULL)) smp_call_function_many(cpu_online_mask, ack_flush, NULL, 1); else if (!cpumask_empty(cpus)) smp_call_function_many(cpus, ack_flush, NULL, 1); else called = false; + preempt_enable_rt(); spin_unlock(&kvm->requests_lock); free_cpumask_var(cpus); return called; -- cgit v1.2.3