amd/kfd: cancle work iterms at ih_wq in kfd_interrupt_exit
Subsystems (3)
PATCH 1/1 amd/kfd: cancle work iterms at ih_wq in kfd_interrupt_exit
From: Xiaogang Chen <[email protected]>
When kfd/amdgpu driver is tearing down cannot handle callback from ih_wq. If there is still work items left cancle them instead of flush that would wait until they got served.
Signed-off-by Xiaogang Chen<[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c +4 -3
@@ -98,11 +98,12 @@ void kfd_interrupt_exit(struct kfd_node *node)spin_unlock_irqrestore (&node->interrupt_lock, flags);/* -* flush_work ensures that there are no outstanding -* work-queue items that will access interrupt_ring. New work items +* cancel work items still at ih_wq ensures that there are no outstanding +* work-queue items that will access interrupt_ring. At this stage kfd/amd +* driver is tearing down, cannot handle call back from wq. New work itemst * can't be created because we stopped interrupt handling above. */ -flush_workqueue (node->ih_wq); +cancel_work (&node->interrupt_work);destroy_workqueue (node->ih_wq);
Signature · 1 line
2.25.1