mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
drm/amdgpu/userq: Fix reference leak in amdgpu_userq_wait_ioctl
Drop reference to syncobj and timeline fence when aborting the ioctl due
output array being too small.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: a292fdecd7 ("drm/amdgpu: Implement userqueue signal/wait IOCTL")
Cc: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
6fde419222
commit
68951e9c3e
|
|
@ -877,6 +877,7 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
|
|||
dma_fence_unwrap_for_each(f, &iter, fence) {
|
||||
if (WARN_ON_ONCE(num_fences >= wait_info->num_fences)) {
|
||||
r = -EINVAL;
|
||||
dma_fence_put(fence);
|
||||
goto free_fences;
|
||||
}
|
||||
|
||||
|
|
@ -901,6 +902,7 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
|
|||
|
||||
if (WARN_ON_ONCE(num_fences >= wait_info->num_fences)) {
|
||||
r = -EINVAL;
|
||||
dma_fence_put(fence);
|
||||
goto free_fences;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user