diff options
author | dumbbell <dumbbell@FreeBSD.org> | 2013-03-23 19:19:19 +0000 |
---|---|---|
committer | dumbbell <dumbbell@FreeBSD.org> | 2013-03-23 19:19:19 +0000 |
commit | 6dc9bf62e8bf4d669e2e1e8cd1b815b2367d9978 (patch) | |
tree | 36b02b86d739a27b395f4dfd0c07a75ea73df4ad /sys/dev/drm2 | |
parent | cd87adcccda5a0f4ff3581786f849db2f1732dd1 (diff) | |
download | FreeBSD-src-6dc9bf62e8bf4d669e2e1e8cd1b815b2367d9978.zip FreeBSD-src-6dc9bf62e8bf4d669e2e1e8cd1b815b2367d9978.tar.gz |
drm/ttm: Fix TTM buffer object refcount
This fixes memory leaks in the radeonkms driver.
Reviewed by: Konstantin Belousov (kib@)
Tested by: J.R. Oldroyd <jr@opal.com>
Diffstat (limited to 'sys/dev/drm2')
-rw-r--r-- | sys/dev/drm2/ttm/ttm_bo_vm.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/dev/drm2/ttm/ttm_bo_vm.c b/sys/dev/drm2/ttm/ttm_bo_vm.c index 3eb4cc7..1c86d95 100644 --- a/sys/dev/drm2/ttm/ttm_bo_vm.c +++ b/sys/dev/drm2/ttm/ttm_bo_vm.c @@ -122,9 +122,7 @@ retry: m = NULL; reserve: - mtx_lock(&bo->glob->lru_lock); - ret = ttm_bo_reserve_locked(bo, false, false, false, 0); - mtx_unlock(&bo->glob->lru_lock); + ret = ttm_bo_reserve(bo, false, false, false, 0); if (unlikely(ret != 0)) { if (ret == -EBUSY) { kern_yield(0); @@ -253,10 +251,8 @@ static int ttm_bo_vm_ctor(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t foff, struct ucred *cred, u_short *color) { - struct ttm_buffer_object *bo = handle; *color = 0; - (void)ttm_bo_reference(bo); return (0); } |