]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable
authorChristoph Hellwig <hch@lst.de>
Tue, 30 Apr 2019 10:51:50 +0000 (06:51 -0400)
committerWill Deacon <will.deacon@arm.com>
Tue, 7 May 2019 09:06:16 +0000 (10:06 +0100)
commita98d9ae937d256ed679a935fc82d9deaa710d98e
tree3982eb41c186c4f306f2187a7adf74d2ac274d84
parentb33f908811b7627015238e0dee9baf2b4c9d720d
arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable

DMA allocations that can't sleep may return non-remapped addresses, but
we do not properly handle them in the mmap and get_sgtable methods.
Resolve non-vmalloc addresses using virt_to_page to handle this corner
case.

Cc: <stable@vger.kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/dma-mapping.c