aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
diff options
context:
space:
mode:
authorXin Xiong <[email protected]>2022-01-21 20:46:23 +0000
committerAlex Deucher <[email protected]>2022-01-25 23:00:33 +0000
commitdfced44f122c500004a48ecc8db516bb6a295a1b (patch)
tree736edbac67360aebc936d219c81ac7eb8e12f546 /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
parentdrm/amdgpu/display: use msleep rather than udelay for long delays (diff)
downloadkernel-dfced44f122c500004a48ecc8db516bb6a295a1b.tar.gz
kernel-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 <[email protected]> Signed-off-by: Xin Xiong <[email protected]> Signed-off-by: Xin Tan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c')
0 files changed, 0 insertions, 0 deletions