diff options
author | Bob Moore <robert.moore@intel.com> | 2008-04-10 11:06:36 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-22 14:29:20 -0400 |
commit | 773069d48030e670cf2032a13ddf16a2e0034df3 (patch) | |
tree | 2f45fd7e90600d26c08c641c75059eb0b15d6dcd /drivers/acpi/parser | |
parent | 4b119e21d0c66c22e8ca03df05d9de623d0eb50f (diff) |
ACPICA: Several fixes for internal method result stack
fixes STACK_OVERFLOW exception on nested method calls. internal
bugzilla 262 and 275.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/parser')
-rw-r--r-- | drivers/acpi/parser/psloop.c | 11 | ||||
-rw-r--r-- | drivers/acpi/parser/psparse.c | 15 |
2 files changed, 3 insertions, 23 deletions
diff --git a/drivers/acpi/parser/psloop.c b/drivers/acpi/parser/psloop.c index 773aee82fbb8..266dd0c10218 100644 --- a/drivers/acpi/parser/psloop.c +++ b/drivers/acpi/parser/psloop.c | |||
@@ -603,13 +603,6 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state, | |||
603 | acpi_ps_pop_scope(&(walk_state->parser_state), op, | 603 | acpi_ps_pop_scope(&(walk_state->parser_state), op, |
604 | &walk_state->arg_types, | 604 | &walk_state->arg_types, |
605 | &walk_state->arg_count); | 605 | &walk_state->arg_count); |
606 | |||
607 | if ((*op)->common.aml_opcode != AML_WHILE_OP) { | ||
608 | status2 = acpi_ds_result_stack_pop(walk_state); | ||
609 | if (ACPI_FAILURE(status2)) { | ||
610 | return_ACPI_STATUS(status2); | ||
611 | } | ||
612 | } | ||
613 | } | 606 | } |
614 | 607 | ||
615 | /* Close this iteration of the While loop */ | 608 | /* Close this iteration of the While loop */ |
@@ -640,10 +633,6 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state, | |||
640 | if (ACPI_FAILURE(status2)) { | 633 | if (ACPI_FAILURE(status2)) { |
641 | return_ACPI_STATUS(status2); | 634 | return_ACPI_STATUS(status2); |
642 | } | 635 | } |
643 | status2 = acpi_ds_result_stack_pop(walk_state); | ||
644 | if (ACPI_FAILURE(status2)) { | ||
645 | return_ACPI_STATUS(status2); | ||
646 | } | ||
647 | 636 | ||
648 | acpi_ut_delete_generic_state | 637 | acpi_ut_delete_generic_state |
649 | (acpi_ut_pop_generic_state | 638 | (acpi_ut_pop_generic_state |
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index 5d63f48e56b5..ce3139a74f95 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c | |||
@@ -349,19 +349,13 @@ acpi_ps_next_parse_state(struct acpi_walk_state *walk_state, | |||
349 | 349 | ||
350 | parser_state->aml = walk_state->aml_last_while; | 350 | parser_state->aml = walk_state->aml_last_while; |
351 | walk_state->control_state->common.value = FALSE; | 351 | walk_state->control_state->common.value = FALSE; |
352 | status = acpi_ds_result_stack_pop(walk_state); | 352 | status = AE_CTRL_BREAK; |
353 | if (ACPI_SUCCESS(status)) { | ||
354 | status = AE_CTRL_BREAK; | ||
355 | } | ||
356 | break; | 353 | break; |
357 | 354 | ||
358 | case AE_CTRL_CONTINUE: | 355 | case AE_CTRL_CONTINUE: |
359 | 356 | ||
360 | parser_state->aml = walk_state->aml_last_while; | 357 | parser_state->aml = walk_state->aml_last_while; |
361 | status = acpi_ds_result_stack_pop(walk_state); | 358 | status = AE_CTRL_CONTINUE; |
362 | if (ACPI_SUCCESS(status)) { | ||
363 | status = AE_CTRL_CONTINUE; | ||
364 | } | ||
365 | break; | 359 | break; |
366 | 360 | ||
367 | case AE_CTRL_PENDING: | 361 | case AE_CTRL_PENDING: |
@@ -383,10 +377,7 @@ acpi_ps_next_parse_state(struct acpi_walk_state *walk_state, | |||
383 | * Just close out this package | 377 | * Just close out this package |
384 | */ | 378 | */ |
385 | parser_state->aml = acpi_ps_get_next_package_end(parser_state); | 379 | parser_state->aml = acpi_ps_get_next_package_end(parser_state); |
386 | status = acpi_ds_result_stack_pop(walk_state); | 380 | status = AE_CTRL_PENDING; |
387 | if (ACPI_SUCCESS(status)) { | ||
388 | status = AE_CTRL_PENDING; | ||
389 | } | ||
390 | break; | 381 | break; |
391 | 382 | ||
392 | case AE_CTRL_FALSE: | 383 | case AE_CTRL_FALSE: |