projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b478ad
)
drm/nouveau: Take fence spinlock in nouveau_fence_channel_fini().
author
Francisco Jerez
<currojerez@riseup.net>
Mon, 18 Oct 2010 01:57:19 +0000
(
03:57
+0200)
committer
Ben Skeggs
<bskeggs@redhat.com>
Fri, 3 Dec 2010 05:06:47 +0000
(15:06 +1000)
Without it there's a potential race with nouveau_fence_update().
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_fence.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nouveau_fence.c
b/drivers/gpu/drm/nouveau/nouveau_fence.c
index
29fe03b
..
f70bec8
100644
(file)
--- a/
drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/
drivers/gpu/drm/nouveau/nouveau_fence.c
@@
-490,6
+490,8
@@
nouveau_fence_channel_fini(struct nouveau_channel *chan)
{
struct nouveau_fence *tmp, *fence;
+ spin_lock(&chan->fence.lock);
+
list_for_each_entry_safe(fence, tmp, &chan->fence.pending, entry) {
fence->signalled = true;
list_del(&fence->entry);
@@
-499,6
+501,8
@@
nouveau_fence_channel_fini(struct nouveau_channel *chan)
kref_put(&fence->refcount, nouveau_fence_del);
}
+
+ spin_unlock(&chan->fence.lock);
}
int