diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-17 09:07:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-17 09:07:37 +0200 |
commit | 15a0654851382faaf41a8da6d4e10201091246b9 (patch) | |
tree | 810678e1b3d71b5b6e3c2422c6dddc6d3065caed /drivers/acpi/acpica/utresrc.c | |
parent | 7f1534e172f5eb9c215a25d73ee9ef57eb1582ba (diff) | |
parent | 4f7d029b9bf009fbee76bb10c0c4351a1870d2f3 (diff) |
Merge 4.11-rc7 into tty-next
We want the tty patch revert in here to handle merges and future work
properly.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/acpi/acpica/utresrc.c')
-rw-r--r-- | drivers/acpi/acpica/utresrc.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c index c86bae7b1d0f..ff096d9755b9 100644 --- a/drivers/acpi/acpica/utresrc.c +++ b/drivers/acpi/acpica/utresrc.c @@ -421,10 +421,8 @@ acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state, ACPI_FUNCTION_TRACE(ut_walk_aml_resources); - /* - * The absolute minimum resource template is one end_tag descriptor. - * However, we will treat a lone end_tag as just a simple buffer. - */ + /* The absolute minimum resource template is one end_tag descriptor */ + if (aml_length < sizeof(struct aml_resource_end_tag)) { return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); } @@ -456,8 +454,9 @@ acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state, /* Invoke the user function */ if (user_function) { - status = user_function(aml, length, offset, - resource_index, context); + status = + user_function(aml, length, offset, resource_index, + context); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -481,12 +480,6 @@ acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state, *context = aml; } - /* Check if buffer is defined to be longer than the resource length */ - - if (aml_length > (offset + length)) { - return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); - } - /* Normal exit */ return_ACPI_STATUS(AE_OK); |