dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
To: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Ben Skeggs <bskeggs@redhat.com>
Subject: [PATCH] drm/nouveau: fix another lock unbalance in nouveau_crtc_page_flip
Date: Thu, 01 May 2014 13:58:05 +0200	[thread overview]
Message-ID: <536236CD.8040806@canonical.com> (raw)

Fixes a regression introduced by 060810d7abaabca "drm/nouveau: fix locking issues in page flipping paths".
chan->cli->mutex is unlocked a second time in the fail_unreserve path, fix this by moving mutex_unlock down.

Cc: stable@vger.kernel.org # v3.11+
---
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 24011596af43..5524a3705224 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -762,9 +762,9 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
  	}
  
  	ret = nouveau_page_flip_emit(chan, old_bo, new_bo, s, &fence);
-	mutex_unlock(&chan->cli->mutex);
  	if (ret)
  		goto fail_unreserve;
+	mutex_unlock(&chan->cli->mutex);
  
  	/* Update the crtc struct and cleanup */
  	crtc->fb = fb;

             reply	other threads:[~2014-05-01 11:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01 11:58 Maarten Lankhorst [this message]
2014-05-01 12:20 ` [PATCH] drm/nouveau: fix another lock unbalance in nouveau_crtc_page_flip Maarten Lankhorst

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=536236CD.8040806@canonical.com \
    --to=maarten.lankhorst@canonical.com \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox