VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Ezequiel Garcia <ezequiel@collabora.com> 2021-07-22 22:05:52 -0300 committer: Sasha Levin <sashal@kernel.org> 2021-08-26 08:35:12 -0400 commit: 7179eac5556ea1cde58ba62df282fcd5d52f430a parent: b89542f4a60b3e702bc0831da4aa619fbbfaa82d
Commit Summary:
iommu/dma: Fix leak in non-contiguous API
Diffstat:
1 file changed, 1 insertion, 0 deletions
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 5d96fcc45fec..698707699327 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -768,6 +768,7 @@ static void iommu_dma_free_noncontiguous(struct device *dev, size_t size,
 	__iommu_dma_unmap(dev, sgt->sgl->dma_address, size);
 	__iommu_dma_free_pages(sh->pages, PAGE_ALIGN(size) >> PAGE_SHIFT);
 	sg_free_table(&sh->sgt);
+	kfree(sh);
 }
 #endif /* CONFIG_DMA_REMAP */