Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu/userq: Fix reference leak in amdgpu_userq_wait_ioctl

Drop reference to syncobj and timeline fence when aborting the ioctl due
output array being too small.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: a292fdecd728 ("drm/amdgpu: Implement userqueue signal/wait IOCTL")
Cc: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 68951e9c3e6bb22396bc42ef2359751c8315dd27)
Cc: <stable@vger.kernel.org> # v6.16+

authored by

Tvrtko Ursulin and committed by
Alex Deucher
49abfa81 6de23f81

+2
+2
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
··· 876 876 dma_fence_unwrap_for_each(f, &iter, fence) { 877 877 if (WARN_ON_ONCE(num_fences >= wait_info->num_fences)) { 878 878 r = -EINVAL; 879 + dma_fence_put(fence); 879 880 goto free_fences; 880 881 } 881 882 ··· 901 900 902 901 if (WARN_ON_ONCE(num_fences >= wait_info->num_fences)) { 903 902 r = -EINVAL; 903 + dma_fence_put(fence); 904 904 goto free_fences; 905 905 } 906 906