]> git.ipfire.org Git - thirdparty/linux.git/commit
swiotlb: Free tbl memory in swiotlb_exit()
authorWill Deacon <will@kernel.org>
Tue, 20 Jul 2021 13:38:26 +0000 (14:38 +0100)
committerKonrad Rzeszutek Wilk <konrad@kernel.org>
Sat, 24 Jul 2021 00:18:02 +0000 (20:18 -0400)
commitad6c00283163cb7ad52cdf97d2850547446f7d98
treecd71502ab4a48cc3887907e07276359d94a01b71
parent1efd3fc0ccf52e1aa5f0bf5b0d82847180d20951
swiotlb: Free tbl memory in swiotlb_exit()

Although swiotlb_exit() frees the 'slots' metadata array referenced by
'io_tlb_default_mem', it leaves the underlying buffer pages allocated
despite no longer being usable.

Extend swiotlb_exit() to free the buffer pages as well as the slots
array.

Cc: Claire Chang <tientzu@chromium.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Claire Chang <tientzu@chromium.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
kernel/dma/swiotlb.c