diff options
author | Bob Moore <robert.moore@intel.com> | 2019-02-15 13:36:07 -0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-02-18 11:21:10 +0100 |
commit | b3381bd90265e3f60878b0f61fc8b1cc7e42b72e (patch) | |
tree | 799740ce91dc024021d7376e11c5e329b7e1f1dd /drivers/acpi/acpica | |
parent | aa342261bde5ff177935c3a4f17f0bf2bf81babf (diff) | |
download | linux-b3381bd90265e3f60878b0f61fc8b1cc7e42b72e.tar.gz linux-b3381bd90265e3f60878b0f61fc8b1cc7e42b72e.tar.bz2 linux-b3381bd90265e3f60878b0f61fc8b1cc7e42b72e.zip |
ACPICA: Interpreter: Emit warning for creation of a zero-length op region
ACPICA commit 387c850c5d49d09d7c2e70b2711e584ad83956a1
Nothing can be done with such a region. Just emit a warning so as
not to abort a table load or running method.
Link: https://github.com/acpica/acpica/commit/387c850c
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')
-rw-r--r-- | drivers/acpi/acpica/dsopcode.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c index cab14713e591..10f32b62608e 100644 --- a/drivers/acpi/acpica/dsopcode.c +++ b/drivers/acpi/acpica/dsopcode.c @@ -356,6 +356,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state, union acpi_operand_object *operand_desc; struct acpi_namespace_node *node; union acpi_parse_object *next_op; + acpi_adr_space_type space_id; ACPI_FUNCTION_TRACE_PTR(ds_eval_region_operands, op); @@ -368,6 +369,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state, /* next_op points to the op that holds the space_ID */ next_op = op->common.value.arg; + space_id = (acpi_adr_space_type)next_op->common.value.integer; /* next_op points to address op */ @@ -403,6 +405,15 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state, obj_desc->region.length = (u32) operand_desc->integer.value; acpi_ut_remove_reference(operand_desc); + /* A zero-length operation region is unusable. Just warn */ + + if (!obj_desc->region.length + && (space_id < ACPI_NUM_PREDEFINED_REGIONS)) { + ACPI_WARNING((AE_INFO, + "Operation Region [%4.4s] has zero length (SpaceId %X)", + node->name.ascii, space_id)); + } + /* * Get the address and save it * (at top of stack - 1) |