Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165215
b: refs/heads/master
c: e3fe091
h: refs/heads/master
i:
  165213: f9d970d
  165211: ab148d3
  165207: 5154eb1
  165199: d536727
  165183: bf14682
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Sep 9, 2009
1 parent 29e31ce commit 8c76c0f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e678902ee899f6b0ab48166b410cdc9f1c27a350
refs/heads/master: e3fe0913b8e732ae636cf23afca76cf2c30718e5
23 changes: 18 additions & 5 deletions trunk/drivers/acpi/acpica/dsobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,14 +482,27 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
if (arg) {
/*
* num_elements was exhausted, but there are remaining elements in the
* package_list.
* package_list. Truncate the package to num_elements.
*
* Note: technically, this is an error, from ACPI spec: "It is an error
* for NumElements to be less than the number of elements in the
* PackageList". However, for now, we just print an error message and
* no exception is returned.
* PackageList". However, we just print an error message and
* no exception is returned. This provides Windows compatibility. Some
* BIOSs will alter the num_elements on the fly, creating this type
* of ill-formed package object.
*/
while (arg) {
/*
* We must delete any package elements that were created earlier
* and are not going to be used because of the package truncation.
*/
if (arg->common.node) {
acpi_ut_remove_reference(ACPI_CAST_PTR
(union
acpi_operand_object,
arg->common.node));
arg->common.node = NULL;
}

/* Find out how many elements there really are */

Expand All @@ -498,15 +511,15 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
}

ACPI_WARNING((AE_INFO,
"Package List length (%X) larger than NumElements count (%X), truncated\n",
"Package List length (0x%X) larger than NumElements count (0x%X), truncated\n",
i, element_count));
} else if (i < element_count) {
/*
* Arg list (elements) was exhausted, but we did not reach num_elements count.
* Note: this is not an error, the package is padded out with NULLs.
*/
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Package List length (%X) smaller than NumElements count (%X), padded with null elements\n",
"Package List length (0x%X) smaller than NumElements count (0x%X), padded with null elements\n",
i, element_count));
}

Expand Down

0 comments on commit 8c76c0f

Please sign in to comment.