-
由 Dave Jiang 提交于
mainline inclusion from mainline-v5.16 commit 85f604af category: bugfix bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I596WO CVE: NA Intel-SIG: commit 85f604af dmaengine: idxd: move out percpu_ref_exit() to ensure it's outside submission. Incremental backporting patches for DSA/IAA on Intel Xeon platform. -------------------------------- percpu_ref_tryget_live() is safe to call as long as ref is between init and exit according to the function comment. Move percpu_ref_exit() so it is called after the dma channel is no longer valid to ensure this holds true. Fixes: 93a40a6d ("dmaengine: idxd: add percpu_ref to descriptor submission path") Suggested-by: NKevin Tian <kevin.tian@intel.com> Signed-off-by: NDave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/163294293832.914350.10326422026738506152.stgit@djiang5-desk3.ch.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org> Signed-off-by: NXiaochen Shen <xiaochen.shen@intel.com>
7af052a4