summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-ktd2692.c
diff options
context:
space:
mode:
authorHsin-Yu Chao <hychao@chromium.org>2016-08-23 12:16:55 +0300
committerVinod Koul <vinod.koul@intel.com>2016-09-09 14:52:42 +0300
commita40235a2278a315261ee007fc433ec1cfb31666f (patch)
treec9d66a25fab25615b58e869f32d8b4a3e4e78503 /drivers/leds/leds-ktd2692.c
parentd64e9a2c750930272492952c16f3f2c95311a6c9 (diff)
downloadlinux-a40235a2278a315261ee007fc433ec1cfb31666f.tar.xz
dmaengine: pl330: Acquire dmac's spinlock in pl330_tx_status
There is a racing when accessing dmac thread in pl330_tx_status that the pl330_update is handling active request at the same time and changing the status of descriptors. This could cause an invalid transferred count from BUSY descriptor added up to the residual number. Fix the bug by using the dmac's spinlock in pl330_tx_status to protect thread resources from changing. Note that the nested order of holding dmac's and dma_chan's spinlock is consistent with the rest of the driver: dma_chan first and then dmac, so it is safe from deadlock scenario. Signed-off-by: Hsin-Yu Chao <hychao@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/leds/leds-ktd2692.c')
0 files changed, 0 insertions, 0 deletions