Commit 7ed28f2e authored by Jiang Liu's avatar Jiang Liu Committed by Len Brown

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: default avatarJiang Liu <jiang.liu@huawei.com>
Acked-by: default avatarHuang Ying <ying.huang@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent c16fa4f2
...@@ -917,7 +917,7 @@ static int erst_check_table(struct acpi_table_erst *erst_tab) ...@@ -917,7 +917,7 @@ static int erst_check_table(struct acpi_table_erst *erst_tab)
{ {
if ((erst_tab->header_length != if ((erst_tab->header_length !=
(sizeof(struct acpi_table_erst) - sizeof(erst_tab->header))) (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; return -EINVAL;
if (erst_tab->header.length < sizeof(struct acpi_table_erst)) if (erst_tab->header.length < sizeof(struct acpi_table_erst))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment