|
@@ -426,7 +426,9 @@ DEFINE_SIMPLE_ATTRIBUTE(error_inject_fops, NULL,
|
|
|
|
|
|
static int einj_check_table(struct acpi_table_einj *einj_tab)
|
|
static int einj_check_table(struct acpi_table_einj *einj_tab)
|
|
{
|
|
{
|
|
- if (einj_tab->header_length != sizeof(struct acpi_table_einj))
|
|
|
|
|
|
+ if ((einj_tab->header_length !=
|
|
|
|
+ (sizeof(struct acpi_table_einj) - sizeof(einj_tab->header)))
|
|
|
|
+ && (einj_tab->header_length != sizeof(struct acpi_table_einj)))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
if (einj_tab->header.length < sizeof(struct acpi_table_einj))
|
|
if (einj_tab->header.length < sizeof(struct acpi_table_einj))
|
|
return -EINVAL;
|
|
return -EINVAL;
|