]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/amd: Fix pci_segment memleak in alloc_pci_segment()
authorJinhui Guo <guojinhui.liam@bytedance.com>
Mon, 27 Oct 2025 16:50:17 +0000 (00:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:39 +0000 (10:14 +0100)
commit168d50e1d82b5869dd7876ddbe3b8d953c5bded3
tree740f18967074fe57d528ee71f8a280bcf490f1da
parentcfcd57cc9e5c3ec0148d810ae5d0b9a421dfd61c
iommu/amd: Fix pci_segment memleak in alloc_pci_segment()

commit 75ba146c2674ba49ed8a222c67f9abfb4a4f2a4f upstream.

Fix a memory leak of struct amd_iommu_pci_segment in alloc_pci_segment()
when system memory (or contiguous memory) is insufficient.

Fixes: 04230c119930 ("iommu/amd: Introduce per PCI segment device table")
Fixes: eda797a27795 ("iommu/amd: Introduce per PCI segment rlookup table")
Fixes: 99fc4ac3d297 ("iommu/amd: Introduce per PCI segment alias_table")
Cc: stable@vger.kernel.org
Signed-off-by: Jinhui Guo <guojinhui.liam@bytedance.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd/init.c