]> xenbits.xensource.com Git - xen.git/commit
arm: remove irq from inflight, then change physical affinity
authorStefano Stabellini <sstabellini@kernel.org>
Wed, 5 Apr 2017 20:28:42 +0000 (13:28 -0700)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 6 Apr 2017 23:15:49 +0000 (16:15 -0700)
commit31bc6a93a096bab21211e0e2c7c284ee4aec5402
treeba055df52ab839e80ba38643415ba1c77ec67899
parentdb7b5b0c50b238ca259b83af3aca102701c4abac
arm: remove irq from inflight, then change physical affinity

This patch fixes a potential race that could happen when
gic_update_one_lr and vgic_vcpu_inject_irq run simultaneously.

When GIC_IRQ_GUEST_MIGRATING is set, we must make sure that the irq has
been removed from inflight before changing physical affinity, to avoid
concurrent accesses to p->inflight, as vgic_vcpu_inject_irq will take a
different vcpu lock.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/gic.c