Date: Sat, 23 Mar 2013 19:19:19 +0000 (UTC) From: Jean-Sebastien Pedron <dumbbell@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248657 - head/sys/dev/drm2/ttm Message-ID: <201303231919.r2NJJJb6050451@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dumbbell Date: Sat Mar 23 19:19:19 2013 New Revision: 248657 URL: http://svnweb.freebsd.org/changeset/base/248657 Log: 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> Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Sat Mar 23 19:04:57 2013 (r248656) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Sat Mar 23 19:19:19 2013 (r248657) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303231919.r2NJJJb6050451>