Bug 507733 - KVM: protect concurrent make_all_cpus_request (upstream backport)
KVM: protect concurrent make_all_cpus_request (upstream backport)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Marcelo Tosatti
Lawrence Lim
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-23 18:25 EDT by Marcelo Tosatti
Modified: 2014-03-25 20:58 EDT (History)
8 users (show)

See Also:
Fixed In Version: kvm-83-85.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 05:36:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
KVM-protect-concurrent-make-all-cpus-request-2.patch (3.43 KB, patch)
2009-06-29 10:17 EDT, Marcelo Tosatti
no flags Details | Diff
KVM-protect-concurrent-make-all-cpus-request-3.patch (2.13 KB, patch)
2009-06-29 10:19 EDT, Marcelo Tosatti
no flags Details | Diff

  None (edit)
Description Marcelo Tosatti 2009-06-23 18:25:42 EDT
commit 7be3cf79427b00a22b2234a9c439d7795e360e4a

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 <aarcange@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Comment 1 Marcelo Tosatti 2009-06-29 10:17:23 EDT
Created attachment 349783 [details]
KVM-protect-concurrent-make-all-cpus-request-2.patch
Comment 2 Marcelo Tosatti 2009-06-29 10:19:23 EDT
Created attachment 349784 [details]
KVM-protect-concurrent-make-all-cpus-request-3.patch
Comment 13 errata-xmlrpc 2009-09-02 05:36:03 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1272.html

Note You need to log in before you can comment on or make changes to this bug.