]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: coh901318: Fix a double-lock bug
authorJia-Ju Bai <baijiaju1990@gmail.com>
Tue, 6 Nov 2018 03:33:48 +0000 (11:33 +0800)
committerVinod Koul <vkoul@kernel.org>
Sat, 24 Nov 2018 14:29:54 +0000 (19:59 +0530)
commita8567c402219f6b9765ba6ebf0b359ede0ebd4d0
treef2342787ccec2ad0ead6a6995298295d5bb5c019
parenta9e80a095d95d1159b26f73bd6d9c2fadc7fb411
dmaengine: coh901318: Fix a double-lock bug

The function coh901318_alloc_chan_resources() calls spin_lock_irqsave()
before calling coh901318_config().
But coh901318_config() calls spin_lock_irqsave() again in its
definition, which may cause a double-lock bug.

Because coh901318_config() is only called by
coh901318_alloc_chan_resources(), the bug fix is to remove the
calls to spin-lock and -unlock functions in coh901318_config().

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/coh901318.c