]> git.baikalelectronics.ru Git - kernel.git/commit
dma-pool: Only allocate from CMA when in same memory zone
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Fri, 14 Aug 2020 10:26:23 +0000 (12:26 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 14 Aug 2020 14:27:05 +0000 (16:27 +0200)
commit1c9ac6eeee3ed0a1ebbeb3cf33a39586a4e22255
tree53d4869dd16cfe73992ceb71094b0914566d5f3d
parent9c6faa0c283d10127f14b8e472cad2f80570a590
dma-pool: Only allocate from CMA when in same memory zone

There is no guarantee to CMA's placement, so allocating a zone specific
atomic pool from CMA might return memory from a completely different
memory zone. To get around this double check CMA's placement before
allocating from it.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/pool.c