summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
diff options
context:
space:
mode:
authorXin Xiong <xiongx18@fudan.edu.cn>2022-01-21 15:46:23 -0500
committerAlex Deucher <alexander.deucher@amd.com>2022-01-25 18:00:33 -0500
commitdfced44f122c500004a48ecc8db516bb6a295a1b (patch)
tree736edbac67360aebc936d219c81ac7eb8e12f546 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
parent0fc2549d55a238da5e4c1b1ae20ebc3856922334 (diff)
downloadlinux-dfced44f122c500004a48ecc8db516bb6a295a1b.tar.gz
linux-dfced44f122c500004a48ecc8db516bb6a295a1b.tar.bz2
linux-dfced44f122c500004a48ecc8db516bb6a295a1b.zip
drm/amd/amdgpu/amdgpu_cs: fix refcount leak of a dma_fence obj
This issue takes place in an error path in amdgpu_cs_fence_to_handle_ioctl(). When `info->in.what` falls into default case, the function simply returns -EINVAL, forgetting to decrement the reference count of a dma_fence obj, which is bumped earlier by amdgpu_cs_get_fence(). This may result in reference count leaks. Fix it by decreasing the refcount of specific object before returning the error code. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Xin Xiong <xiongx18@fudan.edu.cn> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c')
0 files changed, 0 insertions, 0 deletions