mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 15:50:59 +07:00
ACPI, APEI, Fix ERST header length check
This fixes a trivial copy & paste error in ERST header length check. It's just for future safety because sizeof(struct acpi_table_einj) equals to sizeof(struct acpi_table_erst) with current ACPI5.0 specification. It applies to v3.3-rc6. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Acked-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
c16fa4f2ad
commit
7ed28f2ed4
@ -917,7 +917,7 @@ static int erst_check_table(struct acpi_table_erst *erst_tab)
|
||||
{
|
||||
if ((erst_tab->header_length !=
|
||||
(sizeof(struct acpi_table_erst) - sizeof(erst_tab->header)))
|
||||
&& (erst_tab->header_length != sizeof(struct acpi_table_einj)))
|
||||
&& (erst_tab->header_length != sizeof(struct acpi_table_erst)))
|
||||
return -EINVAL;
|
||||
if (erst_tab->header.length < sizeof(struct acpi_table_erst))
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user