]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "dmaengine: imx-sdma: alloclate bd memory from dma pool"
authorLucas Stach <l.stach@pengutronix.de>
Tue, 6 Nov 2018 03:40:28 +0000 (03:40 +0000)
committerVinod Koul <vkoul@kernel.org>
Wed, 5 Dec 2018 08:22:52 +0000 (13:52 +0530)
commitfd5b889f17f2c66ac90dafb72d2b71305ff82b34
tree01d1ea03a33c1979370bb46aea1ff42847f90044
parentc3687db4ec1a6a95fbc361abe2581f10d36691e2
Revert "dmaengine: imx-sdma: alloclate bd memory from dma pool"

This reverts commit de2e9340b44e. The SDMA engine needs the descriptors to
be contiguous in memory. As the dma pool API is only able to provide a
single descriptor per alloc invocation there is no guarantee that multiple
descriptors satisfy this requirement. Also the code in question is broken
as it only allocates memory for a single descriptor, without looking at the
number of descriptors required for the transfer, leading to out-of-bounds
accesses when the descriptors are written.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/imx-sdma.c