diff options
author | Thomas Renninger <trenn@suse.de> | 2008-03-12 01:06:24 +0100 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-03-11 23:57:20 -0400 |
commit | b6a163875935ce8e8e85901a7f2b68f7a314d914 (patch) | |
tree | 7b286cb1bfa15b6cbc4699f9186354a7ea126c93 /drivers/acpi/utils.c | |
parent | d6f882e10442c1ea6ed5f93365f48be4cb520be7 (diff) | |
download | kernel_goldelico_gta04-b6a163875935ce8e8e85901a7f2b68f7a314d914.zip kernel_goldelico_gta04-b6a163875935ce8e8e85901a7f2b68f7a314d914.tar.gz kernel_goldelico_gta04-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index eba55b7..44ea60c 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; |