Bug 507733 - KVM: protect concurrent make_all_cpus_request (upstream backport)
Summary: KVM: protect concurrent make_all_cpus_request (upstream backport)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Marcelo Tosatti
QA Contact: Lawrence Lim
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-23 22:25 UTC by Marcelo Tosatti
Modified: 2014-03-26 00:58 UTC (History)
8 users (show)

Fixed In Version: kvm-83-85.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 09:36:03 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:1272 0 normal SHIPPED_LIVE New package: kvm 2009-09-01 09:34:32 UTC

Description Marcelo Tosatti 2009-06-23 22:25:42 UTC
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
Signed-off-by: Andrea Arcangeli <aarcange>
Signed-off-by: Marcelo Tosatti <mtosatti>
Signed-off-by: Avi Kivity <avi>

Comment 1 Marcelo Tosatti 2009-06-29 14:17:23 UTC
Created attachment 349783 [details]
KVM-protect-concurrent-make-all-cpus-request-2.patch

Comment 2 Marcelo Tosatti 2009-06-29 14:19:23 UTC
Created attachment 349784 [details]
KVM-protect-concurrent-make-all-cpus-request-3.patch

Comment 13 errata-xmlrpc 2009-09-02 09:36:03 UTC
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.