]> git.baikalelectronics.ru Git - kernel.git/commit
dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING for remapped allocations
authorChristoph Hellwig <hch@lst.de>
Fri, 4 Jan 2019 17:31:48 +0000 (18:31 +0100)
committerChristoph Hellwig <hch@lst.de>
Sat, 5 Jan 2019 07:28:29 +0000 (08:28 +0100)
commiteff6e8397cca32baf9a36418eb2decc6ea9eeff3
tree15e02d8bce01367246670de4ff4c533ea9d46244
parentdfac4d54aa5413e2ca7ffddada4ebde3d5aca81b
dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING for remapped allocations

We need to return a dma_addr_t even if we don't have a kernel mapping.
Do so by consolidating the phys_to_dma call in a single place and jump
to it from all the branches that return successfully.

Fixes: ad173432b3e7 ("dma-mapping: support highmem in the generic remap allocator")
Reported-by: Liviu Dudau <liviu@dudau.co.uk
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Liviu Dudau <liviu@dudau.co.uk>
kernel/dma/remap.c