Print this page
update to acpica-unix2-20140114
update to acpica-unix2-20131115
acpica-unix2-20130823
PANKOVs restructure

@@ -3,11 +3,11 @@
  * Module Name: nsalloc - Namespace allocation and deletion utilities
  *
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:

@@ -119,10 +119,11 @@
 void
 AcpiNsDeleteNode (
     ACPI_NAMESPACE_NODE     *Node)
 {
     ACPI_OPERAND_OBJECT     *ObjDesc;
+    ACPI_OPERAND_OBJECT     *NextDesc;
 
 
     ACPI_FUNCTION_NAME (NsDeleteNode);
 
 

@@ -129,28 +130,38 @@
     /* Detach an object if there is one */
 
     AcpiNsDetachObject (Node);
 
     /*
-     * Delete an attached data object if present (an object that was created
-     * and attached via AcpiAttachData). Note: After any normal object is
-     * detached above, the only possible remaining object is a data object.
+     * Delete an attached data object list if present (objects that were
+     * attached via AcpiAttachData). Note: After any normal object is
+     * detached above, the only possible remaining object(s) are data
+     * objects, in a linked list.
      */
     ObjDesc = Node->Object;
-    if (ObjDesc &&
+    while (ObjDesc &&
         (ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA))
     {
         /* Invoke the attached data deletion handler if present */
 
         if (ObjDesc->Data.Handler)
         {
             ObjDesc->Data.Handler (Node, ObjDesc->Data.Pointer);
         }
 
+        NextDesc = ObjDesc->Common.NextObject;
         AcpiUtRemoveReference (ObjDesc);
+        ObjDesc = NextDesc;
     }
 
+    /* Special case for the statically allocated root node */
+
+    if (Node == AcpiGbl_RootNode)
+    {
+        return;
+    }
+
     /* Now we can delete the node */
 
     (void) AcpiOsReleaseObject (AcpiGbl_NamespaceCache, Node);
 
     ACPI_MEM_TRACKING (AcpiGbl_NsNodeList->TotalFreed++);

@@ -582,7 +593,5 @@
     }
 
     (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
     return_VOID;
 }
-
-