]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:44:46 +0000 (06:44 -0700)
commit0810191cb38bd37be47c463939bc165a03a9481e
tree0c8140327782f6e655555adb342d7e65ab103fa4
parentea6a37ae940e99fb49386a75a45825156d9a415d
arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable

commit a98d9ae937d256ed679a935fc82d9deaa710d98e upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/mm/dma-mapping.c