Skip to contentSkip to conversation

drm/radeon/kms: drop lock in return path of radeon_fence_count_emitted.

PATCH In review Dave Airlie 2 participants 2 messages Feb 13, 2012

Subsystems (2)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 drm/radeon/kms: drop lock in return path of radeon_fence_count_emitted.

From: Dave Airlie <[email protected]>

Reported-by Mikko Vinni
---
 drivers/gpu/drm/radeon/radeon_fence.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/radeon_fence.c +3 -1
index 64ea3dd..4bd36a3 100644
@@ -364,8 +364,10 @@ int radeon_fence_count_emitted(struct radeon_device *rdev, int ring)
 	int not_processed = 0;
 
 	read_lock_irqsave(&rdev->fence_lock, irq_flags);
-	if (!rdev->fence_drv[ring].initialized)
+	if (!rdev->fence_drv[ring].initialized) {
+		read_unlock_irqrestore(&rdev->fence_lock, irq_flags);
 		return 0;
+	}
 
 	if (!list_empty(&rdev->fence_drv[ring].emitted)) {
 		struct list_head *ptr;
Signature · 1 line
1.7.7.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Dave Airlie

From: Dave Airlie <[email protected]>

Reported-by Mikko Vinni
Quoted 27 lines

---
 drivers/gpu/drm/radeon/radeon_fence.c |    4 +++-

 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/radeon_fence.c +3 -2
index 64ea3dd..4bd36a3 100644
@@ -364,8 +364,10 @@ int radeon_fence_count_emitted(struct radeon_device *rdev, int ring)
        int not_processed = 0;
 
        read_lock_irqsave(&rdev->fence_lock, irq_flags);
-       if (!rdev->fence_drv[ring].initialized)
+       if (!rdev->fence_drv[ring].initialized) {
+               read_unlock_irqrestore(&rdev->fence_lock, irq_flags);
                return 0;
+       }
 
        if (!list_empty(&rdev->fence_drv[ring].emitted)) {
                struct list_head *ptr;
--

1.7.7.6

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel