OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:16:19 +0000 (09:16 +0100)
commit228bee887467770cda334c94980845f21d7e0b8b
tree9c20c9810143b6ef12be238de6180ca37dcbec4e
parent2f79476548d8f2e93aff4e956b7a29ebc5071eff
Revert "dmaengine: imx-sdma: alloclate bd memory from dma pool"

commit ebb853b1bd5f659b92c71dc6a9de44cfc37c78c0 upstream.

This reverts commit fe5b85c656bc. 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/imx-sdma.c