summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
authorErik Schmauss <erik.schmauss@intel.com>2017-06-05 16:41:43 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-27 22:25:24 +0200
commit2f8c1141da2f53989e1ace6806ab45a385d24487 (patch)
tree360a2da032cf84a23b9472beb667c0f82d5da844 /drivers/acpi/acpica
parente6b6ea37b8e295ac9fa37081fb9a2d08a77a3dc6 (diff)
downloadlinux-2f8c1141da2f53989e1ace6806ab45a385d24487.tar.gz
linux-2f8c1141da2f53989e1ace6806ab45a385d24487.tar.bz2
linux-2f8c1141da2f53989e1ace6806ab45a385d24487.zip
ACPICA: Disassembler: prevent external op's from opening a new scope
ACPICA commit c512c2bfcce65b8e8f37d549ac2fa4a1e0182e46 Since Externals could be of ACPI_TYPE_METHOD, there is a possibility that the acpi_ns_lookup may cause a new scope to be opened. Therefore, disable opening the scope for all acpi_ns_lookup invocations that deal with externals. Link: https://github.com/acpica/acpica/commit/c512c2bf Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r--drivers/acpi/acpica/dswload2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c
index 8d510c7e20c8..ab5d318975f4 100644
--- a/drivers/acpi/acpica/dswload2.c
+++ b/drivers/acpi/acpica/dswload2.c
@@ -310,6 +310,16 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
flags |= ACPI_NS_TEMPORARY;
}
}
+#ifdef ACPI_ASL_COMPILER
+
+ /*
+ * Do not open a scope. This could be an external method
+ * and open a scope.
+ */
+ if (walk_state->opcode == AML_EXTERNAL_OP) {
+ flags |= ACPI_NS_DONT_OPEN_SCOPE;
+ }
+#endif
/* Add new entry or lookup existing entry */