Broken locking in ttm_bo_swapout
thomas at shipmail.org
Thu Jan 27 00:47:39 PST 2011
On 01/20/2011 07:53 PM, Matthew Bullock wrote:
> I have a fairly simple opengl application running on nouveau. It
> effectively just plots a couple of very large images that change
> I've been getting an easily repeatable failure, hitting the
> BUG_ON(in_interrupt) in vfree() that is called during ttm_shrink_work().
> Obviously vfree() is being called with a lock held...
> Looking at the locking up through the stack trace, there's an obvious
> There should be a:
> before the continue in ttm_bo_swapout() in drivers/gpu/drm/ttm/ttm_bo.c
> --- ttm_bo.c~ 2011-01-05 00:50:19.000000000 +0000
> +++ ttm_bo.c 2011-01-20 18:11:57.262813765 +0000
> @@ -1761,6 +1761,7 @@ static int ttm_bo_swapout(struct ttm_mem
> (void) ttm_bo_cleanup_refs(bo, false, false,
> kref_put(&bo->list_kref, ttm_bo_release_list);
> + spin_lock(&glob->lru_lock);
> That fixes the problem for me.
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
Indeed this fix looks correct. Sorry for taking so long to respond.
Could you spin a patch against Dave's drm-fixes tree or do you want me
to do that?
More information about the dri-devel