]> git.itanic.dy.fi Git - linux-stable/commit
arm64: dma-mapping: Fix FORCE_CONTIGUOUS buffer clearing
authorRobin Murphy <robin.murphy@arm.com>
Mon, 10 Dec 2018 19:33:31 +0000 (19:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2018 13:13:04 +0000 (14:13 +0100)
commit87d143de94e24bc209b10750b1937d7b5b9ee648
tree1a4010c1e82488486f5ee7c5f6c9782a4c115f9b
parentb99eaefb6850b38abdd8a2029bbfde08170ec6c9
arm64: dma-mapping: Fix FORCE_CONTIGUOUS buffer clearing

commit 3238c359acee4ab57f15abb5a82b8ab38a661ee7 upstream.

We need to invalidate the caches *before* clearing the buffer via the
non-cacheable alias, else in the worst case __dma_flush_area() may
write back dirty lines over the top of our nice new zeros.

Fixes: dd65a941f6ba ("arm64: dma-mapping: clear buffers allocated with FORCE_CONTIGUOUS flag")
Cc: <stable@vger.kernel.org> # 4.18.x-
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/mm/dma-mapping.c