]> 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:16:55 +0000 (10:16 +0100)
commit47bed96dc7d5151dadd66f60509a75eb33f7d6ef
tree0fc087b7eb2d30a4635647bc57f37da3de77840a
parent00ed0cc57232a453f825bcbe0bf7367c9aeceab3
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