dma-direct: reject highmem pages from dma_alloc_from_contiguous
authorChristoph Hellwig <hch@lst.de>
Sat, 22 Sep 2018 18:47:26 +0000 (20:47 +0200)
committerChristoph Hellwig <hch@lst.de>
Sat, 1 Dec 2018 16:56:08 +0000 (17:56 +0100)
commit704f2c20eaa566f6906e8812b6e2115889bd753d
tree034ad1e559756ddeb333662819a4439a6f817196
parentb18814e767a445534ab9ccba02e82a31208f85d6
dma-direct: reject highmem pages from dma_alloc_from_contiguous

dma_alloc_from_contiguous can return highmem pages depending on the
setup, which a plain non-remapping DMA allocator can't handle.  Detect
this case and fail the allocation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
kernel/dma/direct.c