drm/amdkfd: fix NULL check mistake for process smi event
authorEric Huang <jinhuieric.huang@amd.com>
Mon, 14 Apr 2025 14:45:12 +0000 (10:45 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 21 Apr 2025 14:49:45 +0000 (10:49 -0400)
The mistake will lead to NULL kernel oops, so fix it.

Fixes: 4172b556fd5b ("drm/amdkfd: add smi events for process start and end")
Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c

index 727a4ce..c27fd7a 100644 (file)
@@ -350,7 +350,7 @@ void kfd_smi_event_process(struct kfd_process_device *pdd, bool start)
        struct amdgpu_task_info *task_info;
        struct amdgpu_vm *avm;
 
-       if (pdd->drm_priv)
+       if (!pdd->drm_priv)
                return;
 
        avm = drm_priv_to_vm(pdd->drm_priv);