dmaengine: idxd: fix resource leak on dmaengine driver disable
mainline inclusion from mainline-v5.16 commit a3e340c1 category: bugfix bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I596WO CVE: NA Intel-SIG: commit a3e340c1 dmaengine: idxd: fix resource leak on dmaengine driver disable. Incremental backporting patches for DSA/IAA on Intel Xeon platform. -------------------------------- 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: 0cda4f69 ("dmaengine: idxd: create dmaengine driver for wq 'device'") Reported-by: NJacob Pan <jacob.jun.pan@linux.intel.com> Tested-by: NJacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: NDave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/163517405099.3484556.12521975053711345244.stgit@djiang5-desk3.ch.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org> Signed-off-by: NXiaochen Shen <xiaochen.shen@intel.com>
Showing
想要评论请 注册 或 登录