[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] x86: IRQ fix incorrect logic in __clear_irq_vector

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1313504263 -3600
# Node ID 4797cf4823558e8af9cf80e18fa166c8411ea62f
# Parent  d52e686e0e2f0cde9a53b83163888ade94376376
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@xxxxxxxxxx>
xen-unstable changeset:   23765:68b903bb1b01
xen-unstable date:        Sat Aug 13 10:14:28 2011 +0100

diff -r d52e686e0e2f -r 4797cf482355 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Tue Aug 16 15:17:06 2011 +0100
+++ b/xen/arch/x86/irq.c        Tue Aug 16 15:17:43 2011 +0100
@@ -190,6 +190,7 @@
     if (likely(!cfg->move_in_progress))
+    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++) {

Xen-changelog mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.