msm: dma: Moving queue_work() function within spinlock
Currently we are adding a dma command to the staged list with in a spinlock and then adding to workqueue using queue_work after unlocking the spinlock. With this there is chance of executing DMA commands in out of order in below concurrency case. Tread1 Thread2 __msm_dmov_enqueue_cmd_ext spin_lock_irqsave(..) list_add_tail(..) spin_unlock_irqrestore(..) --PREEMPT-- __msm_dmov_enqueue_cmd_ext spin_lock_irqsave(..) list_add_tail(..) spin_unlock_irqrestore(..) queue_work() .. queue_work() So adding queue_work with in spin_lock will make sure that the work added in the work_queue is processed in the same order as they are added in staged_commands. CRs-Fixed: 423190 Change-Id: I2ffd1327fb5f0cd1f06db7de9c026d1c4997fe4d Acked-by:Gopi Krishna Nedanuri <gnedanur@qti.qualcomm.com> Signed-off-by:
Utsab Bose <ubose@codeaurora.org>
Loading
Please register or sign in to comment