提交 67b16684 编写于 作者: G Guennadi Liakhovetski 提交者: Vinod Koul

dmaengine: nbpfaxi: fix a theoretical race

A race possibility exists if a DMA slave driver tries to free channel
resources witout waiting for all transfers to complete and without
explicitly terminating all requests. In such a case the IRQ processing
thread can race with .device_free_chan_resources(). To fix this race empty
all descriptor lists before freeing descriptor cache.
Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 b45b262c
......@@ -1054,6 +1054,7 @@ static void nbpf_free_chan_resources(struct dma_chan *dchan)
dev_dbg(dchan->device->dev, "Entry %s()\n", __func__);
nbpf_chan_halt(chan);
nbpf_chan_idle(chan);
/* Clean up for if a channel is re-used for MEMCPY after slave DMA */
nbpf_chan_prepare_default(chan);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册