Avoid hitting BUG() for kernel-only fence objects.
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Fri, 29 Jun 2007 13:22:28 +0000 (15:22 +0200)
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Fri, 29 Jun 2007 13:22:28 +0000 (15:22 +0200)
linux-core/drm_fence.c

index ace70d5..5215feb 100644 (file)
@@ -450,6 +450,12 @@ static int drm_fence_object_init(drm_device_t * dev, uint32_t class,
 
        write_lock_irqsave(&fm->lock, flags);
        INIT_LIST_HEAD(&fence->ring);
+
+       /* 
+        *  Avoid hitting BUG() for kernel-only fence objects.
+        */
+
+       INIT_LIST_HEAD(&fence->base.list);
        fence->class = class;
        fence->type = type;
        fence->flush_mask = 0;