Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 0d15ae1

Browse files
committed
Merge remote-tracking branch 'intel-iommu/iommu/fixes' into gvt-staging
2 parents 889a1bc + 5aa95d8 commit 0d15ae1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/iommu/dma-iommu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@ static void iommu_dma_free_noncontiguous(struct device *dev, size_t size,
768768
__iommu_dma_unmap(dev, sgt->sgl->dma_address, size);
769769
__iommu_dma_free_pages(sh->pages, PAGE_ALIGN(size) >> PAGE_SHIFT);
770770
sg_free_table(&sh->sgt);
771+
kfree(sh);
771772
}
772773
#endif /* CONFIG_DMA_REMAP */
773774

drivers/iommu/iommu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,9 @@ void iommu_group_remove_device(struct device *dev)
924924
struct iommu_group *group = dev->iommu_group;
925925
struct group_device *tmp_device, *device = NULL;
926926

927+
if (!group)
928+
return;
929+
927930
dev_info(dev, "Removing from iommu group %d\n", group->id);
928931

929932
/* Pre-notify listeners that a device is being removed. */

0 commit comments

Comments
 (0)