dma: pl330: add critical section for list operation
authorTaekki Kim <taekki.kim@samsung.com>
Mon, 9 Jan 2017 04:07:34 +0000 (13:07 +0900)
committerTaekki Kim <taekki.kim@samsung.com>
Mon, 14 May 2018 05:42:47 +0000 (14:42 +0900)
Change-Id: I8505ac36fcc13a9d0c376bd4dba7fae6558f50cb
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
drivers/dma/pl330.c

index 48d5e03cd318f98495a12c48e0a8906e0f5bcf1b..b5268355ea9420534753bb991e9d032e23adbef1 100644 (file)
@@ -2169,7 +2169,9 @@ static void pl330_tasklet(unsigned long data)
                        }
                } else {
                        desc->status = FREE;
+                       spin_lock(&pch->dmac->pool_lock);
                        list_move_tail(&desc->node, &pch->dmac->desc_pool);
+                       spin_unlock(&pch->dmac->pool_lock);
                }
 
                dma_descriptor_unmap(&desc->txd);