]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: mv_xor: Fix incorrect offset in dma_map_page()
authorStefan Roese <sr@denx.de>
Wed, 1 Jun 2016 10:43:32 +0000 (12:43 +0200)
committerVinod Koul <vinod.koul@intel.com>
Tue, 7 Jun 2016 07:14:23 +0000 (12:44 +0530)
commit6544e34357bf9f5975bbcdce52bcd07d62a92186
treefa3d42f206446c6c36cb43367fdbba2f44018a81
parentfcfbb7397063d5075773a63358ef602d1a3fa907
dmaengine: mv_xor: Fix incorrect offset in dma_map_page()

Upon booting, I occasionally spotted some BUGs triggered by the internal
DMA test routine executed upon driver probing. This was detected by
SLUB_DEBUG ("Freechain corrupt" or "Redzone overwritten"). Tracking
this down located a problem in passing 0 as offset in dma_map_page().
As kmalloc, especially when used with SLUB_DEBUG, may return a non page
aligned address.

This patch fixes this issue by passing the correct offset in
dma_map_page().

Tested on a custom Armada XP board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/mv_xor.c