]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdkfd: Fix resource leak in criu restore queue
authorJesse Zhang <jesse.zhang@amd.com>
Fri, 6 Sep 2024 03:29:55 +0000 (11:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:03:30 +0000 (12:03 +0200)
[ Upstream commit aa47fe8d3595365a935921a90d00bc33ee374728 ]

To avoid memory leaks, release q_extra_data when exiting the restore queue.
v2: Correct the proto (Alex)

Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
Reviewed-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

index 36f0460cbffe63c88a27d81e26234a875623727d..e0f19f3ae2207d9d0f35ce3abc79e43c8bc1ab4f 100644 (file)
@@ -988,6 +988,7 @@ exit:
                pr_debug("Queue id %d was restored successfully\n", queue_id);
 
        kfree(q_data);
+       kfree(q_extra_data);
 
        return ret;
 }