ACPI: relax BAD_MADT_ENTRY check to allow LSAPIC variable length string UIDs
authorStarikovskiy, Alexey Y <alexey.y.starikovskiy@intel.com>
Fri, 18 Aug 2006 15:23:00 +0000 (11:23 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 18 Aug 2006 16:56:50 +0000 (12:56 -0400)
ACPI 3.0 appended a variable length UID string to the LAPIC structure
as part of support for > 256 processors.  So the BAD_MADT_ENTRY() sanity
check can no longer compare for equality with a fixed structure length.

Signed-off-by: Alexey Y Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
arch/i386/kernel/acpi/boot.c
arch/ia64/kernel/acpi.c

index 0db6387025ca77cb9ce81258f0ed5fdf89861512..ee003bc0e8b114ba754b4fc5f6ce70da0b206338 100644 (file)
@@ -59,7 +59,7 @@ static inline int gsi_irq_sharing(int gsi) { return gsi; }
 
 #define BAD_MADT_ENTRY(entry, end) (                                       \
                (!entry) || (unsigned long)entry + sizeof(*entry) > end ||  \
-               ((acpi_table_entry_header *)entry)->length != sizeof(*entry))
+               ((acpi_table_entry_header *)entry)->length < sizeof(*entry))
 
 #define PREFIX                 "ACPI: "
 
index 99761b81db4496a78c0ea1eb0cb1076c438c8c3c..0176556aeeccbf28fa6c14a9c99f07f51750d9ae 100644 (file)
@@ -55,7 +55,7 @@
 
 #define BAD_MADT_ENTRY(entry, end) (                                        \
                (!entry) || (unsigned long)entry + sizeof(*entry) > end ||  \
-               ((acpi_table_entry_header *)entry)->length != sizeof(*entry))
+               ((acpi_table_entry_header *)entry)->length < sizeof(*entry))
 
 #define PREFIX                 "ACPI: "