From d8841647de7c4aa3f3ff5b8b8c4a3f042e848ff0 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Thu, 10 Apr 2008 19:06:39 +0400 Subject: ACPICA: Add error checks to prevent faults Added additional error checking to prevent run-time faults. Signed-off-by: Bob Moore Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- drivers/acpi/executer/exstore.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'drivers/acpi/executer/exstore.c') diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index 912889e..d860f9c 100644 --- a/drivers/acpi/executer/exstore.c +++ b/drivers/acpi/executer/exstore.c @@ -209,8 +209,16 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc, object, level + 4, 0); } } else if (source_desc->reference.node) { - acpi_ex_do_debug_object((source_desc->reference.node)-> - object, level + 4, 0); + if (ACPI_GET_DESCRIPTOR_TYPE + (source_desc->reference.node) != + ACPI_DESC_TYPE_NAMED) { + ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, + " %p - Not a valid namespace node\n")); + } else { + acpi_ex_do_debug_object((source_desc->reference. + node)->object, + level + 4, 0); + } } break; -- cgit v1.1