Skip to content

Commit

Permalink
dmaengine: coh901318: Fix a double lock bug in dma_tc_handle()
Browse files Browse the repository at this point in the history
The caller is already holding the lock so this will deadlock.

Fixes: 0b58828 ("DMAENGINE: COH 901 318 remove irq counting")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200217144050.3i4ymbytogod4ijn@kili.mountain
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Dan Carpenter authored and Vinod Koul committed Feb 24, 2020
1 parent 2d0b191 commit 36d5d22
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/dma/coh901318.c
Original file line number Diff line number Diff line change
Expand Up @@ -1947,8 +1947,6 @@ static void dma_tc_handle(struct coh901318_chan *cohc)
return;
}

spin_lock(&cohc->lock);

/*
* When we reach this point, at least one queue item
* should have been moved over from cohc->queue to
Expand All @@ -1969,8 +1967,6 @@ static void dma_tc_handle(struct coh901318_chan *cohc)
if (coh901318_queue_start(cohc) == NULL)
cohc->busy = 0;

spin_unlock(&cohc->lock);

/*
* This tasklet will remove items from cohc->active
* and thus terminates them.
Expand Down

0 comments on commit 36d5d22

Please sign in to comment.