ACPI: extlog: Handle multiple records
authorTony Luck <tony.luck@intel.com>
Mon, 10 Oct 2022 20:34:23 +0000 (13:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Oct 2022 08:41:16 +0000 (09:41 +0100)
commitfc8c6b8bb294b7c1b2853808648e7a2cec392b61
tree2998af3c664865b864c74eaf63e4186d77c27d81
parent57e157749ad9bce8e44db8dd951e3a363061ed42
ACPI: extlog: Handle multiple records

[ Upstream commit f6ec01da40e4139b41179f046044ee7c4f6370dc ]

If there is no user space consumer of extlog_mem trace records, then
Linux properly handles multiple error records in an ELOG block

extlog_print()
  print_extlog_rcd()
    __print_extlog_rcd()
      cper_estatus_print()
apei_estatus_for_each_section()

But the other code path hard codes looking for a single record to
output a trace record.

Fix by using the same apei_estatus_for_each_section() iterator
to step over all records.

Fixes: 2dfb7d51a61d ("trace, RAS: Add eMCA trace event interface")
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/acpi_extlog.c