diff options
Diffstat (limited to 'source/components/namespace')
-rw-r--r-- | source/components/namespace/nseval.c | 4 | ||||
-rw-r--r-- | source/components/namespace/nsload.c | 16 | ||||
-rw-r--r-- | source/components/namespace/nsutils.c | 20 |
3 files changed, 37 insertions, 3 deletions
diff --git a/source/components/namespace/nseval.c b/source/components/namespace/nseval.c index 6ab6a93a4771..bc7cdcfcc688 100644 --- a/source/components/namespace/nseval.c +++ b/source/components/namespace/nseval.c @@ -284,6 +284,7 @@ AcpiNsEvaluate ( if (ACPI_FAILURE (Status)) { + Info->ReturnObject = NULL; goto Cleanup; } @@ -489,7 +490,8 @@ AcpiNsExecModuleCode ( Status = AcpiNsEvaluate (Info); - ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "Executed module-level code at %p\n", + ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES, + "Executed module-level code at %p\n", MethodObj->Method.AmlStart)); /* Delete a possible implicit return value (in slack mode) */ diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c index b6f85ba031ad..f893348e9670 100644 --- a/source/components/namespace/nsload.c +++ b/source/components/namespace/nsload.c @@ -128,7 +128,21 @@ AcpiNsLoadTable ( } else { - (void) AcpiTbReleaseOwnerId (TableIndex); + /* + * On error, delete any namespace objects created by this table. + * We cannot initialize these objects, so delete them. There are + * a couple of expecially bad cases: + * AE_ALREADY_EXISTS - namespace collision. + * AE_NOT_FOUND - the target of a Scope operator does not + * exist. This target of Scope must already exist in the + * namespace, as per the ACPI specification. + */ + (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); + AcpiNsDeleteNamespaceByOwner ( + AcpiGbl_RootTableList.Tables[TableIndex].OwnerId); + AcpiTbReleaseOwnerId (TableIndex); + + return_ACPI_STATUS (Status); } Unlock: diff --git a/source/components/namespace/nsutils.c b/source/components/namespace/nsutils.c index 83d75d0207ed..35a96c1b4b02 100644 --- a/source/components/namespace/nsutils.c +++ b/source/components/namespace/nsutils.c @@ -90,7 +90,7 @@ AcpiNsPrintNodePathname ( Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER; - Status = AcpiNsHandleToPathname (Node, &Buffer, FALSE); + Status = AcpiNsHandleToPathname (Node, &Buffer, TRUE); if (ACPI_SUCCESS (Status)) { if (Message) @@ -697,6 +697,24 @@ AcpiNsTerminate ( ACPI_FUNCTION_TRACE (NsTerminate); +#ifdef ACPI_EXEC_APP + { + ACPI_OPERAND_OBJECT *Prev; + ACPI_OPERAND_OBJECT *Next; + + /* Delete any module-level code blocks */ + + Next = AcpiGbl_ModuleCodeList; + while (Next) + { + Prev = Next; + Next = Next->Method.Mutex; + Prev->Method.Mutex = NULL; /* Clear the Mutex (cheated) field */ + AcpiUtRemoveReference (Prev); + } + } +#endif + /* * Free the entire namespace -- all nodes and all objects * attached to the nodes |