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

[Xen-changelog] [xen-4.1-testing] x86: Fix argument checking in (privileged) function cpu_add().



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1308167049 -3600
# Node ID 3d1a9facbc2806aaf2bb66d34ae9a03dcb665dd3
# Parent  49ed2ca8c1a28b62e65de0590bd6945ce6e740f1
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 49ed2ca8c1a2 -r 3d1a9facbc28 xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Wed Jun 15 20:43:30 2011 +0100
+++ b/xen/arch/x86/smpboot.c    Wed Jun 15 20:44:09 2011 +0100
@@ -899,7 +899,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 )
+    if ( (acpi_id >= MAX_MADT_ENTRIES) ||
+         (apic_id >= MAX_APICS) ||
+         (pxm >= 256) )
         return -EINVAL;
 
     if ( !cpu_hotplug_begin() )

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


 


Rackspace

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