aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utils.c
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2008-03-11 20:06:24 -0400
committerLen Brown <len.brown@intel.com>2008-03-11 23:57:20 -0400
commitb6a163875935ce8e8e85901a7f2b68f7a314d914 (patch)
tree7b286cb1bfa15b6cbc4699f9186354a7ea126c93 /drivers/acpi/utils.c
parentd6f882e10442c1ea6ed5f93365f48be4cb520be7 (diff)
ACPICA: Warn if packages with invalid references are evaluated
And return an error to avoid NULL pointer access by the caller Lin Ming's patch avoids corrupted mem access when BIOS has invalid references included, the handle is now zero instead of corrupted. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utils.c')
-rw-r--r--drivers/acpi/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index eba55b7d6c95..44ea60cf21c0 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -407,6 +407,12 @@ acpi_evaluate_reference(acpi_handle handle,
407 break; 407 break;
408 } 408 }
409 409
410 if (!element->reference.handle) {
411 printk(KERN_WARNING PREFIX "Invalid reference in"
412 " package %s\n", pathname);
413 status = AE_NULL_ENTRY;
414 break;
415 }
410 /* Get the acpi_handle. */ 416 /* Get the acpi_handle. */
411 417
412 list->handles[i] = element->reference.handle; 418 list->handles[i] = element->reference.handle;