dmaengine: pch_dma.c: Avoid data race between probe and irq handler
authorMadhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Thu, 16 Apr 2020 06:23:35 +0000 (11:53 +0530)
committerVinod Koul <vkoul@kernel.org>
Thu, 23 Apr 2020 06:17:16 +0000 (11:47 +0530)
commit2e45676a4d33af47259fa186ea039122ce263ba9
tree8bba529dc1a9fe11ed8d4760e3a75e421092678f
parentaee45dba3ad9c87affa95e50747fbb82ff4b2e20
dmaengine: pch_dma.c: Avoid data race between probe and irq handler

pd->dma.dev is read in irq handler pd_irq().
However, it is set to pdev->dev after request_irq().
Therefore, set pd->dma.dev to pdev->dev before request_irq() to
avoid data race between pch_dma_probe() and pd_irq().

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

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Link: https://lore.kernel.org/r/20200416062335.29223-1-madhuparnabhowmik10@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/pch_dma.c