dmaengine: idxd: fix cdev locking for open and release
authorNikhil Rao <nikhil.rao@intel.com>
Mon, 22 Jun 2020 20:38:34 +0000 (13:38 -0700)
committerVinod Koul <vkoul@kernel.org>
Wed, 24 Jun 2020 05:47:46 +0000 (11:17 +0530)
commit66983bc18fad17d10766650b3685045f6f092d73
treed37c1f3ae350218ad08902cef5f72e5b06b92c6e
parent2f57b8d57673af2c2caf8c2c7bef01be940a5c2c
dmaengine: idxd: fix cdev locking for open and release

add the wq lock in cdev open and release call. This fixes
race conditions observed in the open and close routines.

Fixes: 42d279f9137a ("dmaengine: idxd: add char driver to expose submission portal to userland")
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/159285824892.64944.2905413694915141834.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/cdev.c