mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 02:14:58 +00:00
drm/ttm: Fix a sync object leak.
If there are multiple simultaneous waiters for the same buffer object, a temporary reference to its sync object may be leaked. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
c9b7fb54f0
commit
fee280d3fd
@ -1575,6 +1575,10 @@ int ttm_bo_wait(struct ttm_buffer_object *bo,
|
|||||||
driver->sync_obj_unref(&sync_obj);
|
driver->sync_obj_unref(&sync_obj);
|
||||||
driver->sync_obj_unref(&tmp_obj);
|
driver->sync_obj_unref(&tmp_obj);
|
||||||
spin_lock(&bo->lock);
|
spin_lock(&bo->lock);
|
||||||
|
} else {
|
||||||
|
spin_unlock(&bo->lock);
|
||||||
|
driver->sync_obj_unref(&sync_obj);
|
||||||
|
spin_lock(&bo->lock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user