From: tip-bot for Ingo Molnar <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
krinkin.m.u@gmail.com, mingo@kernel.org, hpa@zytor.com,
airlied@redhat.com, hughd@google.com, paulmck@linux.vnet.ibm.com,
torvalds@linux-foundation.org, tglx@linutronix.de,
peterz@infradead.org
Subject: [tip:locking/core] locking/drm: Fix i915_gem_shrinker_lock() locking
Date: Wed, 2 Nov 2016 23:25:20 -0700 [thread overview]
Message-ID: <tip-c7faee2109f978f3ef826c48b7e60609061fda4f@git.kernel.org> (raw)
In-Reply-To: <alpine.LSU.2.11.1610301645180.28429@eggly.anvils>
Commit-ID: c7faee2109f978f3ef826c48b7e60609061fda4f
Gitweb: http://git.kernel.org/tip/c7faee2109f978f3ef826c48b7e60609061fda4f
Author: Ingo Molnar <mingo@kernel.org>
AuthorDate: Thu, 3 Nov 2016 07:16:43 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 3 Nov 2016 07:21:12 +0100
locking/drm: Fix i915_gem_shrinker_lock() locking
Mike Krinkin reported hangs in the DRM code and bisected it to:
3ab7c086d5ec72585ef0 ("locking/drm: Kill mutex trickery")
Hugh Dickins observed:
"i915_gem_shrinker_lock() is broken: but copy the pattern from
msm_gem_shrinker_lock() and it's okay - patch below."
Pick up the fix in isolation to make sure the bug is fixed, cleanup
patch will follow up.
Originally-From: Hugh Dickins <hughd@google.com>
Reported-by: Hugh Dickins <hughd@google.com>
Reported-by: Mike Krinkin <krinkin.m.u@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: chris@chris-wilson.co.uk
Cc: jason.low2@hpe.com
Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1610301645180.28429@eggly.anvils
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
drivers/gpu/drm/i915/i915_gem_shrinker.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c
index 3695375..e9bd2a8 100644
--- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
@@ -228,8 +228,9 @@ unsigned long i915_gem_shrink_all(struct drm_i915_private *dev_priv)
static bool i915_gem_shrinker_lock(struct drm_device *dev, bool *unlock)
{
if (!mutex_trylock(&dev->struct_mutex))
- *unlock = false;
+ return false;
+ *unlock = true;
return true;
}
prev parent reply other threads:[~2016-11-03 6:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-30 22:06 Commit "locking/drm: Kill mutex trickery" causes hangs Mike Krinkin
2016-10-31 0:09 ` Hugh Dickins
2016-10-31 13:19 ` Mike Krinkin
2016-11-03 6:25 ` tip-bot for Ingo Molnar [this message]
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=tip-c7faee2109f978f3ef826c48b7e60609061fda4f@git.kernel.org \
--to=tipbot@zytor.com \
--cc=airlied@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=hughd@google.com \
--cc=krinkin.m.u@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.