diff options
-rw-r--r-- | drivers/acpi/executer/exstore.c | 12 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsnames.c | 6 |
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index 912889ed45ed..d860f9c6172c 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, | |||
209 | object, level + 4, 0); | 209 | object, level + 4, 0); |
210 | } | 210 | } |
211 | } else if (source_desc->reference.node) { | 211 | } else if (source_desc->reference.node) { |
212 | acpi_ex_do_debug_object((source_desc->reference.node)-> | 212 | if (ACPI_GET_DESCRIPTOR_TYPE |
213 | object, level + 4, 0); | 213 | (source_desc->reference.node) != |
214 | ACPI_DESC_TYPE_NAMED) { | ||
215 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, | ||
216 | " %p - Not a valid namespace node\n")); | ||
217 | } else { | ||
218 | acpi_ex_do_debug_object((source_desc->reference. | ||
219 | node)->object, | ||
220 | level + 4, 0); | ||
221 | } | ||
214 | } | 222 | } |
215 | break; | 223 | break; |
216 | 224 | ||
diff --git a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c index cbd94af08cc5..e14a1412656b 100644 --- a/drivers/acpi/namespace/nsnames.c +++ b/drivers/acpi/namespace/nsnames.c | |||
@@ -180,6 +180,12 @@ acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node) | |||
180 | next_node = node; | 180 | next_node = node; |
181 | 181 | ||
182 | while (next_node && (next_node != acpi_gbl_root_node)) { | 182 | while (next_node && (next_node != acpi_gbl_root_node)) { |
183 | if (ACPI_GET_DESCRIPTOR_TYPE(next_node) != ACPI_DESC_TYPE_NAMED) { | ||
184 | ACPI_ERROR((AE_INFO, | ||
185 | "Invalid NS Node (%X) while traversing path", | ||
186 | next_node)); | ||
187 | return 0; | ||
188 | } | ||
183 | size += ACPI_PATH_SEGMENT_LENGTH; | 189 | size += ACPI_PATH_SEGMENT_LENGTH; |
184 | next_node = acpi_ns_get_parent_node(next_node); | 190 | next_node = acpi_ns_get_parent_node(next_node); |
185 | } | 191 | } |