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>] [day] [month] [year] [list]
Message-ID: <20161117135908.1537c1b5@canb.auug.org.au>
Date:   Thu, 17 Nov 2016 13:59:08 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
        "H. Peter Anvin" <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Dave Airlie <airlied@...ux.ie>
Cc:     linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
        Chris Wilson <chris@...is-wilson.co.uk>
Subject: linux-next: manual merge of the tip tree with the drm tree

Hi all,

Today's linux-next merge of the tip tree got a conflict in:

  drivers/gpu/drm/i915/i915_gem_shrinker.c

between commit:

  1233e2db199d ("drm/i915: Move object backing storage manipulation to its own locking")

from the drm tree and commit:

  3ab7c086d5ec ("locking/drm: Kill mutex trickery")
  c7faee2109f9 ("locking/drm: Fix i915_gem_shrinker_lock() locking")
  0f5225b024d4 ("locking/mutex, drm: Introduce mutex_trylock_recursive()")

from the tip tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/i915/i915_gem_shrinker.c
index a6fc1bdc48af,c450076d2f9b..000000000000
--- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
@@@ -35,33 -35,6 +35,24 @@@
  #include "i915_drv.h"
  #include "i915_trace.h"
  
- static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
++static bool i915_gem_shrinker_lock(struct drm_device *dev, bool *unlock)
 +{
- 	if (!mutex_is_locked(mutex))
++	switch (mutex_trylock_recursive(&dev->struct_mutex)) {
++	case MUTEX_TRYLOCK_FAILED:
 +		return false;
 +
- #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER)
- 	return mutex->owner == task;
- #else
- 	/* Since UP may be pre-empted, we cannot assume that we own the lock */
- 	return false;
- #endif
- }
- 
- static bool i915_gem_shrinker_lock(struct drm_device *dev, bool *unlock)
- {
- 	if (!mutex_trylock(&dev->struct_mutex)) {
- 		if (!mutex_is_locked_by(&dev->struct_mutex, current))
- 			return false;
++	case MUTEX_TRYLOCK_SUCCESS:
++		*unlock = true;
++		return true;
 +
++	case MUTEX_TRYLOCK_RECURSIVE:
 +		*unlock = false;
- 	} else {
- 		*unlock = true;
++		return true;
 +	}
 +
- 	return true;
++	BUG();
 +}
 +
  static bool any_vma_pinned(struct drm_i915_gem_object *obj)
  {
  	struct i915_vma *vma;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ