lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-c7faee2109f978f3ef826c48b7e60609061fda4f@git.kernel.org>
Date:   Wed, 2 Nov 2016 23:25:20 -0700
From:   tip-bot for Ingo Molnar <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
        krinkin.m.u@...il.com, mingo@...nel.org, hpa@...or.com,
        airlied@...hat.com, hughd@...gle.com, paulmck@...ux.vnet.ibm.com,
        torvalds@...ux-foundation.org, tglx@...utronix.de,
        peterz@...radead.org
Subject: [tip:locking/core] locking/drm: Fix i915_gem_shrinker_lock()
 locking

Commit-ID:  c7faee2109f978f3ef826c48b7e60609061fda4f
Gitweb:     http://git.kernel.org/tip/c7faee2109f978f3ef826c48b7e60609061fda4f
Author:     Ingo Molnar <mingo@...nel.org>
AuthorDate: Thu, 3 Nov 2016 07:16:43 +0100
Committer:  Ingo Molnar <mingo@...nel.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@...gle.com>
Reported-by: Hugh Dickins <hughd@...gle.com>
Reported-by: Mike Krinkin <krinkin.m.u@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Dave Airlie <airlied@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: chris@...is-wilson.co.uk
Cc: jason.low2@....com
Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1610301645180.28429@eggly.anvils
Signed-off-by: Ingo Molnar <mingo@...nel.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;
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ