mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 01:44:33 +03:00
Tables: Add sanity check in AcpiPutTable()
To avoid caller to trigger unexpected warning messages (Link #1): ACPI Warning: Table ffffffffbb461d20, Validation count is zero before decrement Which is reported from AcpiTbPutTable(). 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://bugzilla.kernel.org/show_bug.cgi?id=191221 [#1] Reported-by: Cristian Aravena Romero <caravena@gmail.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
This commit is contained in:
parent
beb7833ef1
commit
73512384c9
@ -522,6 +522,11 @@ AcpiPutTable (
|
||||
ACPI_FUNCTION_TRACE (AcpiPutTable);
|
||||
|
||||
|
||||
if (!Table)
|
||||
{
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
(void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
|
||||
|
||||
/* Walk the root table list */
|
||||
|
Loading…
x
Reference in New Issue
Block a user