]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/AcpiTableDxe: consider version mask when removing tables
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 20 Mar 2017 14:51:36 +0000 (14:51 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 21 Mar 2017 07:07:01 +0000 (07:07 +0000)
commitf859c6796f4064e2142d4bfaae55dbd3aaf70c55
treef12c939247753eb42933677a4a35e45e9c5ce730
parent7043a90eee1150db1d55cdde2a98700fa10838e5
MdeModulePkg/AcpiTableDxe: consider version mask when removing tables

Invocations of EFI_ACPI_TABLE_PROTOCOL::UninstallAcpiTable() may
result in a crash when the value of PcdAcpiExposedTableVersions does
not include EFI_ACPI_TABLE_VERSION_1_0B.

The reason is that EFI_ACPI_TABLE_PROTOCOL::InstallAcpiTable() will
only populate the Rsdt1/Rsdt3 pointers when EFI_ACPI_TABLE_VERSION_1_0B
is set, whereas EFI_ACPI_TABLE_PROTOCOL::UninstallAcpiTable() will
invoke PublishTables with EFI_ACPI_TABLE_VERSION_1_0B alawys set,
resulting in a NULL pointer dereference of the Rsdt1/Rsdt3 pointers.

So take PcdAcpiExposedTableVersions into account for UninstallAcpiTable
as well.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c