summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/dswload2.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2018-11-05 09:43:54 -0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-11-08 18:41:47 +0100
commit927a6abf023b1a8c6940880802fc17026be6a351 (patch)
treecf19f61b5d2ce23e288bf6187e2aecc2eccdeb56 /drivers/acpi/acpica/dswload2.c
parentc159597ca9233b58be0327f3379eba598a6697ef (diff)
ACPICA: iASL: Enhance error detection
Enhance error detection by validating that all name_seg elements within a name_path actually exist. The previous behavior was spotty at best, and such errors could be improperly ignored at compile time (never at runtime, however). There are two new error messages. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/dswload2.c')
-rw-r--r--drivers/acpi/acpica/dswload2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c
index b4685bb5f071..fa38bb3009d5 100644
--- a/drivers/acpi/acpica/dswload2.c
+++ b/drivers/acpi/acpica/dswload2.c
@@ -296,6 +296,14 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
}
#endif
+ /*
+ * For name creation opcodes, the full namepath prefix must
+ * exist, except for the final (new) nameseg.
+ */
+ if (walk_state->op_info->flags & AML_NAMED) {
+ flags |= ACPI_NS_PREFIX_MUST_EXIST;
+ }
+
/* Add new entry or lookup existing entry */
status =