]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit5c3ce32fd12796964dd99ec510900f4d4d0fac2a
tree04f28b838235f8c114f8b40a4dca8801ee7ab750
parent55d844e5819a05cf11a2d5c6ee9d50ba1ed741bd
arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable

BugLink: https://bugs.launchpad.net/bugs/1838700
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arm64/mm/dma-mapping.c