summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utils.c
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2008-03-12 01:06:24 +0100
committerLen Brown <len.brown@intel.com>2008-03-11 23:57:20 -0400
commitb6a163875935ce8e8e85901a7f2b68f7a314d914 (patch)
tree7b286cb1bfa15b6cbc4699f9186354a7ea126c93 /drivers/acpi/utils.c
parentd6f882e10442c1ea6ed5f93365f48be4cb520be7 (diff)
downloadlinux-b6a163875935ce8e8e85901a7f2b68f7a314d914.tar.bz2
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,
break;
}
+ if (!element->reference.handle) {
+ printk(KERN_WARNING PREFIX "Invalid reference in"
+ " package %s\n", pathname);
+ status = AE_NULL_ENTRY;
+ break;
+ }
/* Get the acpi_handle. */
list->handles[i] = element->reference.handle;