]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
dmaengine: ti-dma-crossbar: Fix possible race condition with dma_inuse
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 21 Sep 2017 11:35:32 +0000 (14:35 +0300)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 19 Oct 2017 14:49:27 +0000 (09:49 -0500)
commit03933a9929b3a68abb7eb41f2a75c703c058d0f6
tree275b9bd6ddfee5edc9443fe685f16192514f5a44
parent27e2e4755669485110e9b66e2637f76534550323
dmaengine: ti-dma-crossbar: Fix possible race condition with dma_inuse

BugLink: http://bugs.launchpad.net/bugs/1724669
commit 2ccb4837c938357233a0b8818e3ca3e58242c952 upstream.

When looking for unused xbar_out lane we should also protect the set_bit()
call with the same mutex to protect against concurrent threads picking the
same ID.

Fixes: ec9bfa1e1a796 ("dmaengine: ti-dma-crossbar: dra7: Use bitops instead of idr")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/dma/ti-dma-crossbar.c