提交 96d07940 编写于 作者: L Lv Zheng 提交者: Rafael J. Wysocki

ACPICA: Tables: Add sanity check in acpi_put_table()

ACPICA commit 73512384c9eb1e7f1b28d0a7372df26a3732f96b

To avoid caller to trigger unexpected warning messages (Link #1):
  ACPI Warning: Table ffffffffbb461d20, Validation count is zero before decrement
Which is reported from acpi_tb_put_table(). When the table is validated, the
pointer must be non-zero. Thus the message is not suitable for invalidated
tables. This patch fixes the callee side based on this fact. Reported by
Cristian Aravena Romero, Fixed by Lv Zheng.

Link: https://github.com/acpica/acpica/commit/73512384
Link: https://bugzilla.kernel.org/show_bug.cgi?id=191221 [#1]
Reported-by: NCristian Aravena Romero <caravena@gmail.com>
Signed-off-by: NLv Zheng <lv.zheng@intel.com>
Signed-off-by: NBob Moore <robert.moore@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 7679c35d
...@@ -369,6 +369,10 @@ void acpi_put_table(struct acpi_table_header *table) ...@@ -369,6 +369,10 @@ void acpi_put_table(struct acpi_table_header *table)
ACPI_FUNCTION_TRACE(acpi_put_table); ACPI_FUNCTION_TRACE(acpi_put_table);
if (!table) {
return_VOID;
}
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
/* Walk the root table list */ /* Walk the root table list */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册