dmaengine: tegra-apb: Prevent race conditions on channel's freeing
authorDmitry Osipenko <digetx@gmail.com>
Sun, 9 Feb 2020 16:33:41 +0000 (19:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 18:40:08 +0000 (20:40 +0200)
commit2bf5461825fd6e91e8932356ea95f3b162c22eab
tree725aae00a704552f062f613c4e98018b39c73782
parentd59ef3125cf6683b942e89abfee49765a7721928
dmaengine: tegra-apb: Prevent race conditions on channel's freeing

[ Upstream commit 8e84172e372bdca20c305d92d51d33640d2da431 ]

It's incorrect to check the channel's "busy" state without taking a lock.
That shouldn't cause any real troubles, nevertheless it's always better
not to have any race conditions in the code.

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