drm/amd/amdgpu/amdgpu_cs: fix refcount leak of a dma_fence obj
authorjsg <jsg@openbsd.org>
Thu, 14 Apr 2022 08:33:54 +0000 (08:33 +0000)
committerjsg <jsg@openbsd.org>
Thu, 14 Apr 2022 08:33:54 +0000 (08:33 +0000)
From Xin Xiong
3edd8646cb7c11b57c90e026bda6f21076223f5b in linux 5.15.y/5.15.34
dfced44f122c500004a48ecc8db516bb6a295a1b in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c

index 5d8e149..9a8b254 100644 (file)
@@ -1510,6 +1510,7 @@ int amdgpu_cs_fence_to_handle_ioctl(struct drm_device *dev, void *data,
                return 0;
 
        default:
+               dma_fence_put(fence);
                return -EINVAL;
        }
 }