diff options
| author | Tudor Ambarus <[email protected]> | 2020-01-23 14:03:11 +0000 |
|---|---|---|
| committer | Vinod Koul <[email protected]> | 2020-02-25 11:27:27 +0530 |
| commit | 078a6506141a4ce76bee6c257e9b14f5c606ee4c (patch) | |
| tree | 03227350ce44872ded5f4aa3c138c933e11c99ae /tools/perf/scripts/python | |
| parent | 247b4d83d6525d04278333cf201d6e3b066c9ca5 (diff) | |
dmaengine: at_hdmac: Fix deadlocks
Fix the following deadlocks:
1/ atc_handle_cyclic() and atc_chain_complete() called
dmaengine_desc_get_callback_invoke() while wrongly holding the
atchan->lock. Clients can set the callback to dmaengine_terminate_sync()
which will end up trying to get the same lock, thus a deadlock occurred.
2/ dma_run_dependencies() was called with the atchan->lock held, but the
method calls device_issue_pending() which tries to get the same lock,
and so a deadlock occurred.
The driver must not hold the lock when invoking the callback or when
running dependencies. Releasing the spinlock within a called function
before calling the callback is not a nice thing to do -> called functions
become non-atomic when called within an atomic region. Thus the lock is
now taken in the child routines whereever is needed.
Signed-off-by: Tudor Ambarus <[email protected]>
Acked-by: Ludovic Desroches <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions