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-12 04:57:20 +0100
commitb6a163875935ce8e8e85901a7f2b68f7a314d914 (patch)
tree7b286cb1bfa15b6cbc4699f9186354a7ea126c93 /drivers/acpi/utils.c
parentACPI: use ACPI_DEBUG_PRINT instead of printk in acpi_processor_hotplug_notify() (diff)
downloadlinux-b6a163875935ce8e8e85901a7f2b68f7a314d914.tar.xz
linux-b6a163875935ce8e8e85901a7f2b68f7a314d914.zip
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;