Commit 596c732c authored by Dan Carpenter's avatar Dan Carpenter Committed by Kelsey Skunberg

dmaengine: coh901318: Fix a double lock bug in dma_tc_handle()

BugLink: https://bugs.launchpad.net/bugs/1868628

commit 36d5d220 upstream.

The caller is already holding the lock so this will deadlock.

Fixes: 0b58828c ("DMAENGINE: COH 901 318 remove irq counting")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200217144050.3i4ymbytogod4ijn@kili.mountainSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent b295f82c
...@@ -1960,8 +1960,6 @@ static void dma_tc_handle(struct coh901318_chan *cohc) ...@@ -1960,8 +1960,6 @@ static void dma_tc_handle(struct coh901318_chan *cohc)
return; return;
} }
spin_lock(&cohc->lock);
/* /*
* When we reach this point, at least one queue item * When we reach this point, at least one queue item
* should have been moved over from cohc->queue to * should have been moved over from cohc->queue to
...@@ -1982,8 +1980,6 @@ static void dma_tc_handle(struct coh901318_chan *cohc) ...@@ -1982,8 +1980,6 @@ static void dma_tc_handle(struct coh901318_chan *cohc)
if (coh901318_queue_start(cohc) == NULL) if (coh901318_queue_start(cohc) == NULL)
cohc->busy = 0; cohc->busy = 0;
spin_unlock(&cohc->lock);
/* /*
* This tasklet will remove items from cohc->active * This tasklet will remove items from cohc->active
* and thus terminates them. * and thus terminates them.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment