mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
vfio/iommu_type1: replace kfree with kvfree
Variables allocated by kvzalloc should not be freed by kfree.
Because they may be allocated by vmalloc.
So we replace kfree with kvfree here.
Fixes: d6a4c18566
("vfio iommu: Implementation of ioctl for dirty pages tracking")
Signed-off-by: Jiacheng Shi <billsjc@sjtu.edu.cn>
Link: https://lore.kernel.org/r/20211212091600.2560-1-billsjc@sjtu.edu.cn
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
21ab799585
commit
2bed2ced40
@ -256,7 +256,7 @@ static int vfio_dma_bitmap_alloc(struct vfio_dma *dma, size_t pgsize)
|
||||
|
||||
static void vfio_dma_bitmap_free(struct vfio_dma *dma)
|
||||
{
|
||||
kfree(dma->bitmap);
|
||||
kvfree(dma->bitmap);
|
||||
dma->bitmap = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user