]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: APEI: Better fix to avoid spamming the console with old error logs
authorTony Luck <tony.luck@intel.com>
Wed, 22 Jun 2022 17:09:06 +0000 (10:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Aug 2022 10:57:51 +0000 (12:57 +0200)
commit3db277c2762de2c29ec613d741cd10f53a25f367
tree117dc3a58451fbab79632ad86ad1dddd62d912bc
parent8b266220b5755d1a9be6ea8e63194694f914d766
ACPI: APEI: Better fix to avoid spamming the console with old error logs

commit 7b63dcb85063617ade4afb7d3726a28958a52df6 upstream.

The fix in commit 5debc80f12d4 ("ACPI/APEI: Limit printable size of BERT
table data") does not work as intended on systems where the BIOS has a
fixed size block of memory for the BERT table, relying on s/w to quit
when it finds a record with estatus->block_status == 0. On these systems
all errors are suppressed because the check:

if (region_len < ACPI_BERT_PRINT_MAX_LEN)

always fails.

New scheme skips individual CPER records that are too large, and also
limits the total number of records that will be printed to 5.

Fixes: 5debc80f12d4 ("ACPI/APEI: Limit printable size of BERT table data")
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/apei/bert.c