From 8bb9f81e2a6196b3fd4f1c72edb3ca1e5d4d0d80 Mon Sep 17 00:00:00 2001 Message-Id: <8bb9f81e2a6196b3fd4f1c72edb3ca1e5d4d0d80.1164352294.git.len.brown@intel.com> In-Reply-To: <410c2f0190f74c35505beda6ff3f2da7819f8bac.1164352285.git.len.brown@intel.com> References: <410c2f0190f74c35505beda6ff3f2da7819f8bac.1164352285.git.len.brown@intel.com> From: Robert Moore Date: Tue, 14 Nov 2006 20:10:02 +0300 Subject: [PATCH 55/65] ACPICA: Abort downward walk on temporary node detection. Reply-To: Len Brown Organization: Intel Open Source Technology Center Enhancement to code that ignores temporary namespace nodes Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- drivers/acpi/namespace/nswalk.c | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/acpi/namespace/nswalk.c b/drivers/acpi/namespace/nswalk.c index c6619d8..bccf27d 100644 --- a/drivers/acpi/namespace/nswalk.c +++ b/drivers/acpi/namespace/nswalk.c @@ -194,24 +194,28 @@ acpi_ns_walk_namespace(acpi_object_type child_node); if (child_node) { - /* Found node, Get the type if we are not searching for ANY */ + /* Found next child, get the type if we are not searching for ANY */ if (type != ACPI_TYPE_ANY) { child_type = child_node->type; } /* - * 1) Type must match - * 2) Permanent namespace nodes are OK - * 3) Ignore temporary nodes unless told otherwise. Typically, - * the temporary nodes can cause a race condition where they can - * be deleted during the execution of the user function. Only the - * debugger namespace dump will examine the temporary nodes. + * Ignore all temporary namespace nodes (created during control + * method execution) unless told otherwise. These temporary nodes + * can cause a race condition because they can be deleted during the + * execution of the user function (if the namespace is unlocked before + * invocation of the user function.) Only the debugger namespace dump + * will examine the temporary nodes. */ - if ((child_type == type) && - (!(child_node->flags & ANOBJ_TEMPORARY) || - (child_node->flags & ANOBJ_TEMPORARY) - && (flags & ACPI_NS_WALK_TEMP_NODES))) { + if ((child_node->flags & ANOBJ_TEMPORARY) && + !(flags & ACPI_NS_WALK_TEMP_NODES)) { + status = AE_CTRL_DEPTH; + } + + /* Type must match requested type */ + + else if (child_type == type) { /* * Found a matching node, invoke the user callback function. * Unlock the namespace if flag is set. -- 1.4.4.1