Skip to content

Commit

Permalink
ACPICA: Tables: Fix unbalanced table validations.
Browse files Browse the repository at this point in the history
As acpi_tb_validate_table() returns failure on checksum verification without
doing invalidatation, all its invocations that are not done to a descriptor
stored in acpi_gbl_root_table_list are checked and balanced.

But this is not a real issue as the descritors that have been passed to
acpi_tb_add_table() are all virtual address tables and the validations are in
fact no-op.  The cleanup can ensure that any future extensions made on
acpi_tb_add_table() to allow it to be invoked with physical address tables
will not trigger memory leakage regressions.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
[rjw: Subject]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Lv Zheng authored and Rafael J. Wysocki committed Apr 20, 2014
1 parent 7f9fc99 commit eb0c65b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/acpica/tbinstal.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
if (!table_desc->pointer) {
status = acpi_tb_validate_table(table_desc);
if (ACPI_FAILURE(status) || !table_desc->pointer) {
acpi_tb_invalidate_table(table_desc);
return_ACPI_STATUS(status);
}
}
Expand Down

0 comments on commit eb0c65b

Please sign in to comment.