lkml.org 
[lkml]   [2010]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[152/205] KVM: read apic->irr with ioapic lock held
    2.6.34-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    Read ioapic->irr inside ioapic->lock protected section.

    KVM-Stable-Tag
    Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
    (cherry picked from commit 07dc7263b99e4ddad2b4c69765a428ccb7d48938)
    ---
    virt/kvm/ioapic.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- a/virt/kvm/ioapic.c
    +++ b/virt/kvm/ioapic.c
    @@ -192,12 +192,13 @@ static int ioapic_deliver(struct kvm_ioa

    int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level)
    {
    - u32 old_irr = ioapic->irr;
    + u32 old_irr;
    u32 mask = 1 << irq;
    union kvm_ioapic_redirect_entry entry;
    int ret = 1;

    spin_lock(&ioapic->lock);
    + old_irr = ioapic->irr;
    if (irq >= 0 && irq < IOAPIC_NUM_PINS) {
    entry = ioapic->redirtbl[irq];
    level ^= entry.fields.polarity;



    \
     
     \ /
      Last update: 2010-07-30 20:17    [W:0.018 / U:2.836 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site