Skip to content
Snippets Groups Projects
Commit 581752c3 authored by Hanjun Guo's avatar Hanjun Guo Committed by Greg Kroah-Hartman
Browse files

PCI: Release IVRS table in AMD ACS quirk

[ Upstream commit 090688fa ]

The acpi_get_table() should be coupled with acpi_put_table() if the mapped
table is not used at runtime to release the table mapping.

In pci_quirk_amd_sb_acs(), IVRS table is just used for checking AMD IOMMU
is supported, not used at runtime, so put the table after using it.

Fixes: 15b100df ("PCI: Claim ACS support for AMD southbridge devices")
Link: https://lore.kernel.org/r/1595411068-15440-1-git-send-email-guohanjun@huawei.com


Signed-off-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1700e567
No related branches found
No related tags found
No related merge requests found
...@@ -4307,6 +4307,8 @@ static int pci_quirk_amd_sb_acs(struct pci_dev *dev, u16 acs_flags) ...@@ -4307,6 +4307,8 @@ static int pci_quirk_amd_sb_acs(struct pci_dev *dev, u16 acs_flags)
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
return -ENODEV; return -ENODEV;
acpi_put_table(header);
/* Filter out flags not applicable to multifunction */ /* Filter out flags not applicable to multifunction */
acs_flags &= (PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_EC | PCI_ACS_DT); acs_flags &= (PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_EC | PCI_ACS_DT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment