[RFC PATCH 4/7] ACPICA: Tables: Fix an unwanted exception for table reloading

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

 



When Load/load_table opcode is called again for the same table, it is likely
that the table has already been loaded, so AE_ALREADY_EXISTS shouldn't be a
fatal error but a notice for the caller to skip acpi_ns_load_table(). Reported
by Hans de Goede, fixed by Lv Zheng.

Reported-by: Hans de Goede <hdegoede@xxxxxxxxxx>
Signed-off-by: Lv Zheng <lv.zheng@xxxxxxxxx>
Cc: Hans de Goede <hdegoede@xxxxxxxxxx>
---
 drivers/acpi/acpica/tbdata.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index b7bff76..1a4371b 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -952,6 +952,13 @@ acpi_tb_load_table(u32 *table_index, struct acpi_namespace_node *parent_node)
 
 	status = acpi_tb_validate_table_for_load(table_index, &table);
 	if (ACPI_FAILURE(status)) {
+		if (status == AE_ALREADY_EXISTS) {
+			/*
+			 * Skip the table loading process but return the table index to
+			 * the caller with the exception muted.
+			 */
+			status = AE_OK;
+		}
 		return_ACPI_STATUS(status);
 	}
 
-- 
2.7.4

--
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