drm/nouveau: when bailing out of a pushbuf ioctl, do not remove previous fence
authorBen Skeggs <bskeggs@redhat.com>
Wed, 13 Nov 2013 05:18:32 +0000 (15:18 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 14 Nov 2013 04:55:06 +0000 (14:55 +1000)
Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_gem.c

index c60f65a..78a27f8 100644 (file)
@@ -308,7 +308,8 @@ validate_fini_list(struct list_head *list, struct nouveau_fence *fence,
        list_for_each_safe(entry, tmp, list) {
                nvbo = list_entry(entry, struct nouveau_bo, entry);
 
-               nouveau_bo_fence(nvbo, fence);
+               if (likely(fence))
+                       nouveau_bo_fence(nvbo, fence);
 
                if (unlikely(nvbo->validate_mapped)) {
                        ttm_bo_kunmap(&nvbo->kmap);