]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: jz4780: Fix an endian bug in IRQ handler
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 24 Jun 2019 13:49:40 +0000 (16:49 +0300)
committerVinod Koul <vkoul@kernel.org>
Fri, 5 Jul 2019 07:15:56 +0000 (12:45 +0530)
commitb6ba188898850f23d5fd80675f8fd4bddf1b8c11
tree624c7e0af9e3bbd37d11f68c5d7fea7d4a6b946b
parent3eca66e94acbfb78f14c6c84ee9de16875040762
dmaengine: jz4780: Fix an endian bug in IRQ handler

The "pending" variable was a u32 but we cast it to an unsigned long
pointer when we do the for_each_set_bit() loop.  The problem is that on
big endian 64bit systems that results in an out of bounds read.

Fixes: a40aaab1b094 ("dmaengine: jz4780: Fix transfers being ACKed too soon")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dma-jz4780.c