aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorXiyu Yang <xiyuyang19@fudan.edu.cn>2020-06-13 20:28:38 +0800
committerChristian König <christian.koenig@amd.com>2020-06-15 10:21:19 +0200
commit37cc4b95d13f311c04aa8e9daacca3905ad45ca7 (patch)
treea52280817494b5501819c02da9c4247262680901 /samples
parentgpu/drm: Ingenic: Fix opaque pointer casted to wrong type (diff)
downloadlinux-dev-37cc4b95d13f311c04aa8e9daacca3905ad45ca7.tar.xz
linux-dev-37cc4b95d13f311c04aa8e9daacca3905ad45ca7.zip
drm/ttm: Fix dma_fence refcnt leak in ttm_bo_vm_fault_reserved
ttm_bo_vm_fault_reserved() invokes dma_fence_get(), which returns a reference of the specified dma_fence object to "moving" with increased refcnt. When ttm_bo_vm_fault_reserved() returns, local variable "moving" becomes invalid, so the refcount should be decreased to keep refcount balanced. The reference counting issue happens in several exception handling paths of ttm_bo_vm_fault_reserved(). When those error scenarios occur such as "err" equals to -EBUSY, the function forgets to decrease the refcnt increased by dma_fence_get(), causing a refcnt leak. Fix this issue by calling dma_fence_put() when no_wait_gpu flag is equals to true. Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/370219/ Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions