linux-stable/drivers/acpi/apei
Shiju Jose b7765b0a03 ACPI: APEI: Fix AER info corruption when error status data has multiple sections
[ Upstream commit e2abc47a5a ]

ghes_handle_aer() passes AER data to the PCI core for logging and
recovery by calling aer_recover_queue() with a pointer to struct
aer_capability_regs.

The problem was that aer_recover_queue() queues the pointer directly
without copying the aer_capability_regs data.  The pointer was to
the ghes->estatus buffer, which could be reused before
aer_recover_work_func() reads the data.

To avoid this problem, allocate a new aer_capability_regs structure
from the ghes_estatus_pool, copy the AER data from the ghes->estatus
buffer into it, pass a pointer to the new struct to
aer_recover_queue(), and free it after aer_recover_work_func() has
processed it.

Reported-by: Bjorn Helgaas <helgaas@kernel.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 17:19:37 +00:00
..
apei-base.c ACPI: APEI: Remove a useless include 2022-12-02 20:18:50 +01:00
apei-internal.h efi: fix missing prototype warnings 2023-05-25 09:26:19 +02:00
bert.c ACPI: APEI: mark bert_disable as __initdata 2023-06-12 19:23:25 +02:00
einj.c ACPI: APEI: EINJ: warn on invalid argument when explicitly indicated by platform 2023-03-27 20:46:08 +02:00
erst-dbg.c ACPI: APEI: Fix missing ERST record id 2022-04-13 20:29:24 +02:00
erst.c ACPI: APEI: Remove unneeded result variables 2022-09-24 18:50:42 +02:00
ghes.c ACPI: APEI: Fix AER info corruption when error status data has multiple sections 2023-11-28 17:19:37 +00:00
hest.c ACPI: APEI: fix return value of __setup handlers 2022-03-08 19:43:39 +01:00
Kconfig ACPI / APEI: Switch NOTIFY_SEA to use the estatus queue 2019-02-07 23:10:45 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00