aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2007-02-02 11:48:21 -0500
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:28 -0500
commitc1014629c0fc563be65e675e72bcc9bd7db50195 (patch)
tree7e3927c822dde3b79d6185a455649b90575ad48d /drivers
parent3effba32069514e56bcb778f90cd34fdbac79a50 (diff)
ACPICA: Abort downward walk on temporary node detection.
Enhancement to code that ignores temporary namespace nodes Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/namespace/nswalk.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/acpi/namespace/nswalk.c b/drivers/acpi/namespace/nswalk.c
index c6619d8a5164..bccf27d712e1 100644
--- a/drivers/acpi/namespace/nswalk.c
+++ b/drivers/acpi/namespace/nswalk.c
@@ -194,24 +194,28 @@ acpi_ns_walk_namespace(acpi_object_type type,
194 child_node); 194 child_node);
195 if (child_node) { 195 if (child_node) {
196 196
197 /* Found node, Get the type if we are not searching for ANY */ 197 /* Found next child, get the type if we are not searching for ANY */
198 198
199 if (type != ACPI_TYPE_ANY) { 199 if (type != ACPI_TYPE_ANY) {
200 child_type = child_node->type; 200 child_type = child_node->type;
201 } 201 }
202 202
203 /* 203 /*
204 * 1) Type must match 204 * Ignore all temporary namespace nodes (created during control
205 * 2) Permanent namespace nodes are OK 205 * method execution) unless told otherwise. These temporary nodes
206 * 3) Ignore temporary nodes unless told otherwise. Typically, 206 * can cause a race condition because they can be deleted during the
207 * the temporary nodes can cause a race condition where they can 207 * execution of the user function (if the namespace is unlocked before
208 * be deleted during the execution of the user function. Only the 208 * invocation of the user function.) Only the debugger namespace dump
209 * debugger namespace dump will examine the temporary nodes. 209 * will examine the temporary nodes.
210 */ 210 */
211 if ((child_type == type) && 211 if ((child_node->flags & ANOBJ_TEMPORARY) &&
212 (!(child_node->flags & ANOBJ_TEMPORARY) || 212 !(flags & ACPI_NS_WALK_TEMP_NODES)) {
213 (child_node->flags & ANOBJ_TEMPORARY) 213 status = AE_CTRL_DEPTH;
214 && (flags & ACPI_NS_WALK_TEMP_NODES))) { 214 }
215
216 /* Type must match requested type */
217
218 else if (child_type == type) {
215 /* 219 /*
216 * Found a matching node, invoke the user callback function. 220 * Found a matching node, invoke the user callback function.
217 * Unlock the namespace if flag is set. 221 * Unlock the namespace if flag is set.