]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list
authorDmitry Osipenko <digetx@gmail.com>
Sun, 9 Feb 2020 16:33:39 +0000 (19:33 +0300)
committerVinod Koul <vkoul@kernel.org>
Tue, 25 Feb 2020 06:27:09 +0000 (11:57 +0530)
commita6993af41b0ac74537613ab12a51ca819ec0af0e
tree820e2729f28c84d740298a984bf0e0f65c9e3cf4
parent77e5cab6ced0250acae8abcb5a3edc41fee2df2a
dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list

The interrupt handler puts a half-completed DMA descriptor on a free list
and then schedules tasklet to process bottom half of the descriptor that
executes client's callback, this creates possibility to pick up the busy
descriptor from the free list. Thus, let's disallow descriptor's re-use
until it is fully processed.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200209163356.6439-3-digetx@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/tegra20-apb-dma.c