Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: Make sure the FADT is at least rev 2 before using the reset register

The reset register was only introduced with version 2 of the FADT, so we
should check that the FADT revision before trusting its contents.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by

Matthew Garrett and committed by
Len Brown
95cf3e12 6734fe57

+5
+5
drivers/acpi/reboot.c
··· 15 15 16 16 rr = &acpi_gbl_FADT.reset_register; 17 17 18 + /* ACPI reset register was only introduced with v2 of the FADT */ 19 + 20 + if (acpi_gbl_FADT.header.revision < 2) 21 + return; 22 + 18 23 /* Is the reset register supported? The spec says we should be 19 24 * checking the bit width and bit offset, but Windows ignores 20 25 * these fields */