diff options
author | Paul Cercueil <[email protected]> | 2020-10-04 16:03:07 +0200 |
---|---|---|
committer | Vinod Koul <[email protected]> | 2020-10-05 09:58:48 +0530 |
commit | baf6fd97b16ea8f981b8a8b04039596f32fc2972 (patch) | |
tree | b999737798889eeb99d98737fec629a1b5ff96b6 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | a841592fb3a70bc3f3c2eaa2c1781479a52f76f9 (diff) |
dmaengine: dma-jz4780: Fix race in jz4780_dma_tx_status
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 was deferenced in the critical section of the first
function.
Fix this race by checking the channel's cookie state after entering the
critical function and not before.
Fixes: d894fc6046fe ("dmaengine: jz4780: add driver for the Ingenic JZ4780 DMA controller")
Cc: [email protected] # v4.0
Signed-off-by: Paul Cercueil <[email protected]>
Reported-by: Artur Rojek <[email protected]>
Tested-by: Artur Rojek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions