]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
amd/amdkfd: fix a kfd_process ref leak
authorYifan Zhang <yifan1.zhang@amd.com>
Wed, 21 May 2025 10:06:28 +0000 (18:06 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 May 2025 14:57:02 +0000 (10:57 -0400)
This patch is to fix a kfd_prcess ref leak.

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_events.c

index e54e708ed82de1d429ee7754d70e5841ed3afdbc..2b294ada3ec0576804e332c188b4b500084c5f28 100644 (file)
@@ -1350,6 +1350,7 @@ void kfd_signal_poison_consumed_event(struct kfd_node *dev, u32 pasid)
        user_gpu_id = kfd_process_get_user_gpu_id(p, dev->id);
        if (unlikely(user_gpu_id == -EINVAL)) {
                WARN_ONCE(1, "Could not get user_gpu_id from dev->id:%x\n", dev->id);
+               kfd_unref_process(p);
                return;
        }