WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.1-testing] x86: IRQ fix incorrect logic in __clear_irq_vector
From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
Date: Wed, 17 Aug 2011 06:00:24 +0100
Delivery-date: Tue, 16 Aug 2011 22:02:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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))
         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++) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.1-testing] x86: IRQ fix incorrect logic in __clear_irq_vector, Xen patchbot-4 . 1-testing <=