Skip to content

Commit

Permalink
DMAENGINE: at_hdmac: locking fixlet
Browse files Browse the repository at this point in the history
atc_chain_complete shall be called with atchan->lock held
and bh disabled.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Yong Wang authored and Dan Williams committed Aug 5, 2010
1 parent 61cd220 commit b0ebeb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/dma/at_hdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,12 +790,12 @@ static int atc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
list_splice_init(&atchan->queue, &list);
list_splice_init(&atchan->active_list, &list);

spin_unlock_bh(&atchan->lock);

/* Flush all pending and queued descriptors */
list_for_each_entry_safe(desc, _desc, &list, desc_node)
atc_chain_complete(atchan, desc);

spin_unlock_bh(&atchan->lock);

return 0;
}

Expand Down

0 comments on commit b0ebeb9

Please sign in to comment.