From 2cfa2341ce260cac6bd9615e36a408312b96c072 Mon Sep 17 00:00:00 2001 From: Ivan Lipski Date: Tue, 18 Aug 2026 12:39:27 -0400 Subject: [PATCH] drm/amd/display: Guard amdgpu_dm_irq_schedule_work against NULL irq_wq [Why&How] An interrupt racing DM teardown can reach amdgpu_dm_irq_schedule_work() after the IRQ workqueue is destroyed, passing a NULL wq to queue_work() and crashing in __queue_work(). Bail out early when adev->dm.irq_wq is NULL so a registered handler is simply not queued. Reviewed-by: Alex Hung Signed-off-by: Ivan Lipski Tested-by: Dan Wheeler Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c index d0239a3de2e1..546911b152e4 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c @@ -618,6 +618,9 @@ STATIC_IFN_KUNIT void amdgpu_dm_irq_schedule_work(struct amdgpu_device *adev, DM_IRQ_TABLE_LOCK(adev, irq_table_flags); + if (!adev->dm.irq_wq) + goto out_unlock; + if (list_empty(handler_list)) goto out_unlock;