287ca6da2e
23725-pci-add-device.patch 23762-iommu-fault-bm-off.patch 23763-pci-multi-seg-x2apic-vtd-no-crash.patch 23765-x86-irq-vector-leak.patch 23766-x86-msi-vf-bars.patch 23771-x86-ioapic-clear-pin.patch 23772-x86-trampoline.patch 23774-x86_64-EFI-EDD.patch 23776-x86-kexec-hpet-legacy-bcast-disable.patch 23781-pm-wide-ACPI-ids.patch 23782-x86-ioapic-clear-irr.patch 23783-ACPI-set-_PDC-bits.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=140
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
# HG changeset patch
|
|
# User Andrew Cooper <andrew.cooper3@citrix.com>
|
|
# Date 1313226868 -3600
|
|
# Node ID 68b903bb1b01b2a6ef9c6e8ead3be3c1c2208341
|
|
# Parent 67b883402736ef1746cd6654da4c898f70f40723
|
|
x86: IRQ fix incorrect logic in __clear_irq_vector
|
|
|
|
In the old code, tmp_mask is the cpu_and of cfg->cpu_mask and
|
|
cpu_online_map. However, in the usual case of moving an IRQ from one
|
|
PCPU to another because the scheduler decides its a good idea,
|
|
cfg->cpu_mask and cfg->old_cpu_mask do not intersect. This causes the
|
|
old cpu vector_irq table to keep the irq reference when it shouldn't.
|
|
|
|
This leads to a resource leak if a domain is shut down wile an irq has
|
|
a move pending, which results in Xen's create_irq() eventually failing
|
|
with -ENOSPC when all vector_irq tables are full of stale references.
|
|
|
|
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
|
|
--- a/xen/arch/x86/irq.c
|
|
+++ b/xen/arch/x86/irq.c
|
|
@@ -190,6 +190,7 @@ static void __clear_irq_vector(int irq)
|
|
|
|
if (likely(!cfg->move_in_progress))
|
|
return;
|
|
+ cpus_and(tmp_mask, cfg->old_cpu_mask, cpu_online_map);
|
|
for_each_cpu_mask(cpu, tmp_mask) {
|
|
for (vector = FIRST_DYNAMIC_VECTOR; vector <= LAST_DYNAMIC_VECTOR;
|
|
vector++) {
|