drivers/dma/dma-jz4780: Fix race condition between probe and irq handler
authorMadhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Fri, 21 Aug 2020 03:44:23 +0000 (09:14 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 11:55:33 +0000 (13:55 +0200)
commit79a1d64700261bf1ebeb90c7da630b4373a9bb14
tree73bf1bcccf02c0a6015826c4f5be8364a0c59f0d
parent7a08699028e409a08b57c02268108053bae320e3
drivers/dma/dma-jz4780: Fix race condition between probe and irq handler

[ Upstream commit 6d6018fc30bee67290dbed2fa51123f7c6f3d691 ]

In probe, IRQ is requested before zchan->id is initialized which can be
read in the irq handler. Hence, shift request irq after other initializations
complete.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20200821034423.12713-1-madhuparnabhowmik10@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/dma-jz4780.c