aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorJavi Merino <[email protected]>2011-10-18 11:50:07 +0100
committerRussell King <[email protected]>2011-10-22 22:11:23 +0100
commitee3f615819404a9438b2dd01b7a39f276d2737f2 (patch)
tree8b725dfe99118faef327d163cf02a5fff28d8bf4 /net/lapb/lapb_timer.c
parentb55fa18817743c3c4aef14f0c6fc0e21d7bc1e62 (diff)
ARM: 7136/1: pl330: Fix a race condition
If two requests have been submitted and one of them is running, if you call pl330_chan_ctrl(ch_id, PL330_OP_START), there's a window of time between the spin_lock_irqsave() and the _state() check in which the running transaction may finish. In that case, we don't receive the interrupt (because they are disabled), but _start() sees that the DMA is stopped, so it starts it. The problem is that it sends the transaction that has just finished again, because pl330_update() hasn't mark it as done yet. This patch fixes this race condition by not calling _start() if the DMA is already executing transactions. When interrupts are reenabled, pl330_update() will call _start(). Reference: <[email protected]> Signed-off-by: Javi Merino <[email protected]> Acked-by: Jassi Brar <[email protected]> Signed-off-by: Russell King <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions