Skip to contentSkip to conversation

DMAENGINE: at_hdmac: locking fixlet

PATCH New Yong Wang 1 participant 1 message Aug 5, 2010

Subsystems (2)
lore
Share & tools
lore

Yong Wang

author
#0 lore raw

PATCH 1/1 DMAENGINE: at_hdmac: locking fixlet

atc_chain_complete shall be called with atchan->lock held and bh disabled.

---
 drivers/dma/at_hdmac.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/dma/at_hdmac.c +2 -2
index bd5250e..646f6d6 100644
@@ -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;
 }
 
Signature · 1 line
1.5.5.1