From: Matthew Bullock <matthew.bullock@tadpole.com>
To: dri-devel@lists.freedesktop.org
Subject: Broken locking in ttm_bo_swapout
Date: Thu, 20 Jan 2011 10:53:16 -0800 [thread overview]
Message-ID: <4D38849C.5020808@tadpole.com> (raw)
I have a fairly simple opengl application running on nouveau. It
effectively just plots a couple of very large images that change regularly.
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
mistake:
There should be a:
spin_lock(&glob->lru_lock);
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
spin_unlock(&glob->lru_lock);
(void) ttm_bo_cleanup_refs(bo, false, false,
false);
kref_put(&bo->list_kref, ttm_bo_release_list);
+ spin_lock(&glob->lru_lock);
continue;
}
That fixes the problem for me.
Matthew
next reply other threads:[~2011-01-20 19:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-20 18:53 Matthew Bullock [this message]
2011-01-24 11:52 ` Broken locking in ttm_bo_swapout Maarten Maathuis
2011-01-27 8:47 ` Thomas Hellstrom
2011-01-28 14:07 ` [PATCH] Fix broken locking in ttm_bo_swapout() Matthew Bullock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D38849C.5020808@tadpole.com \
--to=matthew.bullock@tadpole.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox