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-devel

[Xen-devel] [PATCH] x86: return value of domain_pirq_to_irq() is signed

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: return value of domain_pirq_to_irq() is signed
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 15 Jun 2010 13:07:24 +0100
Delivery-date: Tue, 15 Jun 2010 05:09:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
That value can, for forcibly unbound PIRQs, validly be negative, and
for the respective check to catch those cases (and prevent using these
negative values as array index), the respective variables must be of
signed type.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-06-15.orig/xen/arch/x86/irq.c  2010-06-15 09:21:05.000000000 +0200
+++ 2010-06-15/xen/arch/x86/irq.c       2010-06-15 13:23:00.000000000 +0200
@@ -887,7 +887,7 @@ static void __do_IRQ_guest(int irq)
 struct irq_desc *domain_spin_lock_irq_desc(
     struct domain *d, int pirq, unsigned long *pflags)
 {
-    unsigned int irq;
+    int irq;
     unsigned long flags;
     struct irq_desc *desc;
 
@@ -1054,7 +1054,7 @@ extern int ioapic_ack_new;
 static int pirq_acktype(struct domain *d, int pirq)
 {
     struct irq_desc  *desc;
-    unsigned int irq;
+    int irq;
 
     irq = domain_pirq_to_irq(d, pirq);
     if ( irq <= 0 )



Attachment: x86-signed-domain-irq.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: return value of domain_pirq_to_irq() is signed, Jan Beulich <=