Dean Nelson 2cff98b99c arm64: add missing PAGE_ALIGN() to __dma_free()
__dma_alloc() does a PAGE_ALIGN() on the passed in size argument before
doing anything else. __dma_free() does not. And because it doesn't, it is
possible to leak memory should size not be an integer multiple of PAGE_SIZE.

The solution is to add a PAGE_ALIGN() to __dma_free() like is done in
__dma_alloc().

Additionally, this patch removes a redundant PAGE_ALIGN() from
__dma_alloc_coherent(), since __dma_alloc_coherent() can only be called
from __dma_alloc(), which already does a PAGE_ALIGN() before the call.

Cc: stable@vger.kernel.org
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-04-29 17:39:39 +01:00
..
2015-04-24 07:55:54 -07:00
2015-04-24 07:58:07 -07:00
2015-04-16 18:48:55 -04:00
2015-04-26 13:31:05 -07:00
2015-04-24 08:46:18 -07:00
2015-04-21 09:42:58 -07:00
2015-04-24 07:56:50 -07:00
2015-04-21 09:33:10 -07:00
2015-04-24 08:46:18 -07:00
2015-04-24 07:59:07 -07:00
2015-04-17 15:32:30 -04:00
2015-04-16 13:53:32 -05:00