Skip to content
Commit 341198ed authored by Leonid Iziumtsev's avatar Leonid Iziumtsev Committed by Vinod Koul
Browse files

dmaengine: imx-dma: fix wrong callback invoke



Once the "ld_queue" list is not empty, next descriptor will migrate
into "ld_active" list. The "desc" variable will be overwritten
during that transition. And later the dmaengine_desc_get_callback_invoke()
will use it as an argument. As result we invoke wrong callback.

That behaviour was in place since:
commit fcaaba6c ("dmaengine: imx-dma: fix callback path in tasklet").
But after commit 4cd13c21 ("softirq: Let ksoftirqd do its job")
things got worse, since possible delay between tasklet_schedule()
from DMA irq handler and actual tasklet function execution got bigger.
And that gave more time for new DMA request to be submitted and
to be put into "ld_queue" list.

It has been noticed that DMA issue is causing problems for "mxc-mmc"
driver. While stressing the system with heavy network traffic and
writing/reading to/from sd card simultaneously the timeout may happen:

10013000.sdhci: mxcmci_watchdog: read time out (status = 0x30004900)

That often lead to file system corruption.

Signed-off-by: default avatarLeonid Iziumtsev <leonid.iziumtsev@gmail.com>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Cc: stable@vger.kernel.org
parent dc3f595b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment