ACPI: MRRM: Check revision of MRRM table
PATCH 1/1 ACPI: MRRM: Check revision of MRRM table
Before trying to parse the MRRM table, check that the table revision is the one that is expected.
--- drivers/acpi/acpi_mrrm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/acpi/acpi_mrrm.c +3 -0
@@ -63,6 +63,9 @@ static __init int acpi_parse_mrrm(struct acpi_table_header *table)if (!mrrm)return -ENODEV ; +if (mrrm->header.revision !=1 ) +return -EINVAL ; +if (mrrm->flags &ACPI_MRRM_FLAGS_REGION_ASSIGNMENT_OS )return -EOPNOTSUPP ;
Signature · 1 line
2.51.0
Rafael J. Wysocki
maintainerQuoted 3 lines · Tony Luck
Before trying to parse the MRRM table, check that the table revision is the one that is expected.
OK, so should there be a Fixes: tag? Or is it just a tidy-up of the code?
Quoted 23 lines
Signed-off-by Tony Luck <[email protected]>--- drivers/acpi/acpi_mrrm.c | 3 +++ 1 file changed, 3 insertions(+)drivers/acpi/acpi_mrrm.c +3
-1@@ -63,6 +63,9 @@ static __init int acpi_parse_mrrm(struct acpi_table_header *table)if (!mrrm)return -ENODEV ; +if (mrrm->header.revision !=1 ) +return -EINVAL ; +if (mrrm->flags &ACPI_MRRM_FLAGS_REGION_ASSIGNMENT_OS )return -EOPNOTSUPP ; --2.51.0
Quoted 4 lines
Quoted 2 lines
Before trying to parse the MRRM table, check that the table revision is the one that is expected.
OK, so should there be a Fixes: tag? Or is it just a tidy-up of the code?
I'd be surprised if this table changed. But the h/w team that proposed the MRRM table nagged me to check the revision "just in case". Which seems like good practice.
Might as well add a Fixes to get this back ported in case someone locks onto v6.16 or v6.17.
Would you like me to post a V2, or can you just edit this in as you apply?
-Tony
Rafael J. Wysocki
maintainerQuoted 10 lines · Tony
Quoted 5 lines
Quoted 3 lines
Before trying to parse the MRRM table, check that the table revision is the one that is expected.
OK, so should there be a Fixes: tag? Or is it just a tidy-up of the code?
I'd be surprised if this table changed. But the h/w team that proposed the MRRM table nagged me to check the revision "just in case". Which seems like good practice.
Quoted 6 lines
Might as well add a Fixes to get this back ported in case someone locks onto v6.16 or v6.17.
Fixes b9020bdb9f76 ("ACPI: MRRM: Minimal parse of ACPI MRRM table")Would you like me to post a V2, or can you just edit this in as you apply?
No worries, I can edit it.
Rafael J. Wysocki
maintainerQuoted 12 lines · Rafael J. Wysocki
Quoted 10 lines · Tony
Quoted 5 lines
Quoted 3 lines
Before trying to parse the MRRM table, check that the table revision is the one that is expected.
OK, so should there be a Fixes: tag? Or is it just a tidy-up of the code?
I'd be surprised if this table changed. But the h/w team that proposed the MRRM table nagged me to check the revision "just in case". Which seems like good practice.
Quoted 8 lines
Quoted 6 lines
Might as well add a Fixes to get this back ported in case someone locks onto v6.16 or v6.17.
Fixes b9020bdb9f76 ("ACPI: MRRM: Minimal parse of ACPI MRRM table")Would you like me to post a V2, or can you just edit this in as you apply?
No worries, I can edit it.
Applied with the Fixed: tag added as 6.18-rc material, thanks!