[PATCH 16/28] ACPICA: Tables: Fix the issue that table validations are not balanced.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Signed-off-by: Bob Moore <robert.moore@xxxxxxxxx>
---
 drivers/acpi/acpica/tbinstal.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 93a99ef..d3e1db2 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -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);
 		}
 	}
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux