]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: idxd: fix resource leak on dmaengine driver disable
authorDave Jiang <dave.jiang@intel.com>
Mon, 25 Oct 2021 15:01:04 +0000 (08:01 -0700)
committerVinod Koul <vkoul@kernel.org>
Thu, 28 Oct 2021 17:24:45 +0000 (22:54 +0530)
commit529eda4a2023c9cc6a436c13e95a70adb75d574c
tree507311ba54e79001f1d4e5b5598ae59f80592f66
parent385970e64d294eccda201bbf98a448cf4bcdd1b2
dmaengine: idxd: fix resource leak on dmaengine driver disable

The wq resources needs to be released before the kernel type is reset by
__drv_disable_wq(). With dma channels unregistered and wq quiesced, all the
wq resources for dmaengine can be freed. There is no need to wait until wq
is disabled. With the wq->type being reset to "unknown", the driver is
skipping the freeing of the resources.

Fixes: aa1687408a5d ("dmaengine: idxd: create dmaengine driver for wq 'device'")
Reported-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Tested-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/163517405099.3484556.12521975053711345244.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/dma.c