Skip to content

Commit ae769fb

Browse files
xiaochunleerafaeljw
authored andcommitted
ACPI: extlog: Fix finding the generic error data for v3 structure
Fix by using acpi_hest_get_payload() to find out the correct generic error data for v3 structure. The revision v300 generic error data is different from the old one, so for compatibility with old and new version, change to a new interface to locate the right memory error section that was defined in CPER. Signed-off-by: Xiaochun Lee <lixc17@lenovo.com> Reviewed-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 2ccdd1b commit ae769fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/acpi_extlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
172172
fru_text = "";
173173
sec_type = (guid_t *)gdata->section_type;
174174
if (guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
175-
struct cper_sec_mem_err *mem = (void *)(gdata + 1);
175+
struct cper_sec_mem_err *mem = acpi_hest_get_payload(gdata);
176176

177177
if (gdata->error_data_length >= sizeof(*mem))
178178
trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,

0 commit comments

Comments
 (0)