]> git.baikalelectronics.ru Git - 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)
committerVinod Koul <vinod.koul@intel.com>
Thu, 21 Sep 2017 17:33:42 +0000 (23:03 +0530)
commitd23ab3a59de61646f821e969b829837665ab7b6c
tree8fad3dac3958c7bbceb583cd940d34efde1d536e
parent74df82301be1c53cd5e0e3961d7a01702cf4dc3c
dmaengine: ti-dma-crossbar: Fix possible race condition with dma_inuse

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: 9b9079574dcf0 ("dmaengine: ti-dma-crossbar: dra7: Use bitops instead of idr")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: stable@vger.kernel.org
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/ti-dma-crossbar.c