From: Marcelo Tosatti Date: Wed, 17 Jun 2009 13:53:47 +0000 (-0300) Subject: KVM: protect concurrent make_all_cpus_request X-Git-Tag: v2.6.31-rc2~73^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84261923d3dddb766736023bead6fa07b7e218d5;p=pandora-kernel.git KVM: protect concurrent make_all_cpus_request make_all_cpus_request contains a race condition which can trigger false request completed status, as follows: CPU0 CPU1 if (test_and_set_bit(req,&vcpu->requests)) .... if (test_and_set_bit(req,&vcpu->requests)) .. return proceed to smp_call_function_many(wait=1) Use a spinlock to serialize concurrent CPUs. Cc: stable@kernel.org Signed-off-by: Andrea Arcangeli Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- Reading git-diff-tree failed