summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/acresrc.h
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2013-11-21 12:17:34 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-21 13:47:04 +0100
commit9a0a35972591f91167556b4a61673d08ef07f310 (patch)
tree81dc770c8618c8a8e5f6a147592cdd7a79b18565 /drivers/acpi/acpica/acresrc.h
parentc38f671e390fe0d1605b402a28b01b1dbf8e10b3 (diff)
downloadblackbird-op-linux-9a0a35972591f91167556b4a61673d08ef07f310.tar.gz
blackbird-op-linux-9a0a35972591f91167556b4a61673d08ef07f310.zip
ACPICA: Resources: Fix loop termination for the get AML length function.
The loop terminates on a NULL resource pointer, which can never happen since the loop simply increments a valid resource pointer. This fix changes the loop to terminate on an end-of-buffer condition. Problem can be seen by callers to AcpiSetCurrentResources with an invalid or corrupted resource descriptor; or a resource descriptor without an END_TAG descriptor. (refined by Bob Moore) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/acresrc.h')
-rw-r--r--drivers/acpi/acpica/acresrc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/acresrc.h b/drivers/acpi/acpica/acresrc.h
index f691d0e4d9fa..ff97430455cb 100644
--- a/drivers/acpi/acpica/acresrc.h
+++ b/drivers/acpi/acpica/acresrc.h
@@ -184,7 +184,7 @@ acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer,
struct acpi_buffer *output_buffer);
acpi_status
-acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer,
+acpi_rs_create_aml_resources(struct acpi_buffer *resource_list,
struct acpi_buffer *output_buffer);
acpi_status
@@ -227,8 +227,8 @@ acpi_rs_get_list_length(u8 * aml_buffer,
u32 aml_buffer_length, acpi_size * size_needed);
acpi_status
-acpi_rs_get_aml_length(struct acpi_resource *linked_list_buffer,
- acpi_size * size_needed);
+acpi_rs_get_aml_length(struct acpi_resource *resource_list,
+ acpi_size resource_list_size, acpi_size * size_needed);
acpi_status
acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
OpenPOWER on IntegriCloud