]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: sf-pdma: Fix an error that calls callback twice
authorBrad Kim <brad.kim@sifive.com>
Thu, 3 Sep 2020 11:17:26 +0000 (20:17 +0900)
committerVinod Koul <vkoul@kernel.org>
Fri, 11 Sep 2020 12:09:53 +0000 (17:39 +0530)
commit22f1d20a55894358b4dc41c0c64729ccd35df82f
tree6d3cee9438e16209ba8a152ab8fbbac6767c7382
parent7741b5dead791821c1f0c4820cbb35ed98bf808c
dmaengine: sf-pdma: Fix an error that calls callback twice

Because a callback is called twice when DMA transfer complete
the second callback may be possible to access a freed memory
if the first callback routines perform the dma_release_channel function.
So this patch serialized the callback functions

Signed-off-by: Brad Kim <brad.kim@semifive.com>
Tested-and-reviewed-by: Green Wan <green.wan@sifive.com>
Signed-off-by: Brad Kim <brad.kim@sifive.com>
Link: https://lore.kernel.org/r/20200903111726.3413-1-brad.kim@sifive.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sf-pdma/sf-pdma.c