summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/tbutils.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-04-04 06:38:35 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-20 22:59:38 +0200
commit55df23f0d620c5194ecbd3b68ecdb2798778bf93 (patch)
tree22d088acce0e908142f0d8bef2323849f192677f /drivers/acpi/acpica/tbutils.c
parentACPICA: Tables: Fix the issues in handling virtual addressed tables. (diff)
downloadlinux-55df23f0d620c5194ecbd3b68ecdb2798778bf93.tar.xz
linux-55df23f0d620c5194ecbd3b68ecdb2798778bf93.zip
ACPICA: Tables: Fix multiple ACPI_FREE()s around acpi_tb_add_table().
Currently there are following issues in acpi_tb_add_table(): Following logic is currently correct: 1. When a table is allocated in acpi_ex_load_op(), if a reloading happens, the allocated memory is freed by acpi_tb_add_table() and AE_OK is returned to the caller to avoid the caller to free it again. Following logic is currently incorrect: 1. When a table is allocated in acpi_ex_load_op() or by the acpi_load_table() caller, if the table is already loaded, there will be twice ACPI_FREE() called for the same pointer when acpi_tb_add_table() returns AE_ALREADY_EXISTS. This patch only fixes the above incorrect logic in acpi_tb_add_table(): 1. Only invoke acpi_tb_delete_table() if AE_OK is going to be returned. 2. After doing so, we do not invoke ACPI_FREE() when returning AE_OK; 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>
Diffstat (limited to 'drivers/acpi/acpica/tbutils.c')
0 files changed, 0 insertions, 0 deletions