]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
dmaengine: stm32-mdma: use vchan_terminate_vdesc() in .terminate_all
authorAmelie Delaunay <amelie.delaunay@st.com>
Mon, 27 Jan 2020 08:53:34 +0000 (09:53 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:47:32 +0000 (14:47 +0100)
commit55fcf6236fb6dda437b52e57c31e189440f7e5e7
treeec56b870e52b3b8b5e729973d456fb96d97f69dc
parenta1ff6a9e16fc05823ddbc7103ff483cd94adcbf8
dmaengine: stm32-mdma: use vchan_terminate_vdesc() in .terminate_all

BugLink: https://bugs.launchpad.net/bugs/1900624
[ Upstream commit dfc708812a2acfc0ca56f56233b3c3e7b0d4ffe7 ]

To avoid race with vchan_complete, use the race free way to terminate
running transfer.

Move vdesc->node list_del in stm32_mdma_start_transfer instead of in
stm32_mdma_xfer_end to avoid another race in vchan_dma_desc_free_list.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/20200127085334.13163-7-amelie.delaunay@st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/dma/stm32-mdma.c