Re: [PATCH] dma: dma-jz4780: Fix race in jz4780_dma_tx_status

2020-10-04 Thread Vinod Koul
On 04-10-20, 16:03, Paul Cercueil wrote: > The jz4780_dma_tx_status() function would check if a channel's cookie > state was set to 'completed', and if not, it would enter the critical > section. However, in that time frame, the jz4780_dma_chan_irq() function > was able to set the cookie to

[PATCH] dma: dma-jz4780: Fix race in jz4780_dma_tx_status

2020-10-04 Thread Paul Cercueil
The jz4780_dma_tx_status() function would check if a channel's cookie state was set to 'completed', and if not, it would enter the critical section. However, in that time frame, the jz4780_dma_chan_irq() function was able to set the cookie to 'completed', and clear the jzchan->vchan pointer, which