drm/radeon: Unreference GEM object outside of spinlock in page flip error path.
authorMichel Dänzer <michel@daenzer.net>
Tue, 13 Sep 2011 09:29:12 +0000 (11:29 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 14 Sep 2011 12:36:39 +0000 (13:36 +0100)
Should fix https://bugzilla.redhat.com/show_bug.cgi?id=726277 .

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_display.c

index 6cc17fb96a5751eb62bfb85cdc7ffadb751a3862..6adb3e58affdc3fccbce06e254cf648c6f4de5cb 100644 (file)
@@ -473,8 +473,8 @@ pflip_cleanup:
        spin_lock_irqsave(&dev->event_lock, flags);
        radeon_crtc->unpin_work = NULL;
 unlock_free:
-       drm_gem_object_unreference_unlocked(old_radeon_fb->obj);
        spin_unlock_irqrestore(&dev->event_lock, flags);
+       drm_gem_object_unreference_unlocked(old_radeon_fb->obj);
        radeon_fence_unref(&work->fence);
        kfree(work);