Skip to content

Commit

Permalink
ACPICA: Warn if packages with invalid references are evaluated
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Renninger authored and Len Brown committed Mar 12, 2008
1 parent d6f882e commit b6a1638
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/acpi/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b6a1638

Please sign in to comment.