dmaengine: idxd: move out percpu_ref_exit() to ensure it's outside submission
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:Kevin Tian <kevin.tian@intel.com> Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/163294293832.914350.10326422026738506152.stgit@djiang5-desk3.ch.intel.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
Showing
Please register or sign in to comment