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: fix syncobj leak for amdgpu_gem_va_ioctl()

It requires freeing the syncobj and chain
alloction resource.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Prike Liang and committed by
Alex Deucher
a0f0b6d3 16df395a

+5
+5
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
··· 107 107 *chain = dma_fence_chain_alloc(); 108 108 if (!*chain) { 109 109 drm_syncobj_put(*syncobj); 110 + *syncobj = NULL; 110 111 return -ENOMEM; 111 112 } 112 113 ··· 981 980 timeline_chain, 982 981 fence, 983 982 args->vm_timeline_point); 983 + timeline_chain = NULL; 984 984 } 985 985 } 986 986 dma_fence_put(fence); ··· 989 987 } 990 988 991 989 error: 990 + dma_fence_chain_free(timeline_chain); 991 + if (timeline_syncobj) 992 + drm_syncobj_put(timeline_syncobj); 992 993 drm_exec_fini(&exec); 993 994 error_put_gobj: 994 995 drm_gem_object_put(gobj);