Re: [PATCH] dmaengine: mv_xor: Use correct device for DMA API
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: 2019-02-19 11:03:19
Also in:
dmaengine
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: 2019-02-19 11:03:19
Also in:
dmaengine
Hello Robin, Thanks a lot for fixing this! On Mon, 18 Feb 2019 18:27:06 +0000 Robin Murphy [off-list ref] wrote:
Using dma_dev->dev for mappings before it's assigned with the correct
device is unlikely to work as expected, and with future dma-direct
changes, passing a NULL device may end up crashing entirely. I don't
know enough about this hardware or the mv_xor_prep_dma_interrupt()
operation to implement the appropriate error-handling logic that would
have revealed those dma_map_single() calls failing on arm64 for as long
as the driver has been enabled there, but moving the assignment earlier
will at least make the current code operate as intended.
Fixes: 22843545b200 ("dma: mv_xor: Add support for DMA_INTERRUPT")
Reported-by: John David Anglin <redacted>
Tested-by: John David Anglin <redacted>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Tested-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel