Commit b6a16387 authored by Thomas Renninger's avatar Thomas Renninger Committed by Len Brown

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: default avatarThomas Renninger <trenn@suse.de>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent d6f882e1
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment