diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-17 09:25:26 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-17 09:25:26 -0400 |
commit | 4bf311ddfbffe12d41ad1a3c311ab727db6f72cb (patch) | |
tree | 9d19a2774e83637d86dc876f3af22af1dacf0bec /drivers/acpi/tables/tbget.c | |
parent | 597d0cae0f99f62501e229bed50e8149604015bb (diff) | |
parent | 82d6897fefca6206bca7153805b4c5359ce97fc4 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/acpi/tables/tbget.c')
-rw-r--r-- | drivers/acpi/tables/tbget.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c index 99eacceff563..7856db759af0 100644 --- a/drivers/acpi/tables/tbget.c +++ b/drivers/acpi/tables/tbget.c | |||
@@ -320,6 +320,16 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
320 | 320 | ||
321 | ACPI_FUNCTION_TRACE(tb_get_this_table); | 321 | ACPI_FUNCTION_TRACE(tb_get_this_table); |
322 | 322 | ||
323 | /* Validate minimum length */ | ||
324 | |||
325 | if (header->length < sizeof(struct acpi_table_header)) { | ||
326 | ACPI_ERROR((AE_INFO, | ||
327 | "Table length (%X) is smaller than minimum (%X)", | ||
328 | header->length, sizeof(struct acpi_table_header))); | ||
329 | |||
330 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); | ||
331 | } | ||
332 | |||
323 | /* | 333 | /* |
324 | * Flags contains the current processor mode (Virtual or Physical | 334 | * Flags contains the current processor mode (Virtual or Physical |
325 | * addressing) The pointer_type is either Logical or Physical | 335 | * addressing) The pointer_type is either Logical or Physical |
@@ -356,7 +366,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
356 | */ | 366 | */ |
357 | status = acpi_os_map_memory(address->pointer.physical, | 367 | status = acpi_os_map_memory(address->pointer.physical, |
358 | (acpi_size) header->length, | 368 | (acpi_size) header->length, |
359 | (void *)&full_table); | 369 | ACPI_CAST_PTR(void, &full_table)); |
360 | if (ACPI_FAILURE(status)) { | 370 | if (ACPI_FAILURE(status)) { |
361 | ACPI_ERROR((AE_INFO, | 371 | ACPI_ERROR((AE_INFO, |
362 | "Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X", | 372 | "Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X", |