All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: secure ioapic_guest_write() against FREE_TO_ASSIGN irq values
@ 2008-11-19 16:05 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2008-11-19 16:05 UTC (permalink / raw)
  To: xen-devel

Signed-off-by: Jan Beulich <jbeulich@novell.com>

Index: 2008-10-27/xen/arch/x86/io_apic.c
===================================================================
--- 2008-10-27.orig/xen/arch/x86/io_apic.c	2008-11-19 15:41:31.000000000 +0100
+++ 2008-10-27/xen/arch/x86/io_apic.c	2008-11-19 16:56:51.000000000 +0100
@@ -2186,7 +2186,7 @@ int ioapic_guest_write(unsigned long phy
     if ( new_rte.vector >= FIRST_DYNAMIC_VECTOR )
         new_irq = vector_irq[new_rte.vector];
 
-    if ( (old_irq != new_irq) && (old_irq != -1) && IO_APIC_IRQ(old_irq) )
+    if ( (old_irq != new_irq) && (old_irq >= 0) && IO_APIC_IRQ(old_irq) )
     {
         if ( irq_desc[IO_APIC_VECTOR(old_irq)].action )
         {
@@ -2198,7 +2198,7 @@ int ioapic_guest_write(unsigned long phy
         remove_pin_at_irq(old_irq, apic, pin);
     }
 
-    if ( (new_irq != -1) && IO_APIC_IRQ(new_irq) )
+    if ( (new_irq >= 0) && IO_APIC_IRQ(new_irq) )
     {
         if ( irq_desc[IO_APIC_VECTOR(new_irq)].action )
         {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-19 16:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19 16:05 [PATCH] x86: secure ioapic_guest_write() against FREE_TO_ASSIGN irq values Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.