ACPI: Use correct region struct for BERT region size check

The structure representing BERT data is struct acpi_bert_region, so its
size should be used in the BERT region size check.

Update the code in question accordingly.

Signed-off-by: Thomas Renninger <trenn@suse.de>
[ rjw: Changelog edits ]
Link: https://patch.msgid.link/20260717065129.72924-2-trenn@suse.de
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Thomas Renninger
2026-07-17 08:51:21 +02:00
committed by Rafael J. Wysocki
parent 1590cf0329
commit f45c999e67

View File

@@ -447,7 +447,7 @@ static int acpi_bert_data_init(void *th, struct acpi_data_attr *data_attr)
struct acpi_table_bert *bert = th;
if (bert->header.length < sizeof(struct acpi_table_bert) ||
bert->region_length < sizeof(struct acpi_hest_generic_status)) {
bert->region_length < sizeof(struct acpi_bert_region)) {
kfree(data_attr);
return -EINVAL;
}