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.0-testing] x86: Fix argument checking in (privile

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] x86: Fix argument checking in (privileged) function cpu_add().
From: Xen patchbot-4.0-testing <patchbot@xxxxxxx>
Date: Thu, 16 Jun 2011 21:22:08 +0100
Delivery-date: Thu, 16 Jun 2011 13:23:01 -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 Keir Fraser <keir@xxxxxxx>
# Date 1308167343 -3600
# Node ID 649372e3d46a795040a358075869336b15b6b627
# Parent  76d1f7dc697cd7fecdd7d2bd8142dacd3d1764c0
x86: Fix argument checking in (privileged) function cpu_add().

Thanks to John McDermott <john.mcdermott@xxxxxxxxxxxx> for spotting.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset:   23505:5a557fda70a9
xen-unstable date:        Fri Jun 10 08:08:44 2011 +0100
---


diff -r 76d1f7dc697c -r 649372e3d46a xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Wed Jun 15 20:47:02 2011 +0100
+++ b/xen/arch/x86/smpboot.c    Wed Jun 15 20:49:03 2011 +0100
@@ -1477,8 +1477,9 @@
        dprintk(XENLOG_DEBUG, "cpu_add apic_id %x acpi_id %x pxm %x\n",
                apic_id, acpi_id, pxm);
 
-       if ( acpi_id > MAX_MADT_ENTRIES || apic_id > MAX_APICS || pxm > 256 )
-               return -EINVAL;
+       if ( (acpi_id >= MAX_MADT_ENTRIES) ||
+            (apic_id >= MAX_APICS) ||
+            (pxm >= 256) )
 
        /* Detect if the cpu has been added before */
        if ( x86_acpiid_to_apicid[acpi_id] != 0xff)

_______________________________________________
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.0-testing] x86: Fix argument checking in (privileged) function cpu_add()., Xen patchbot-4 . 0-testing <=