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]
Date:   Thu, 12 Oct 2017 19:44:25 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Daniel Vetter <daniel.vetter@...ll.ch>,
        Intel Graphics <intel-gfx@...ts.freedesktop.org>,
        DRI <dri-devel@...ts.freedesktop.org>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Tvrtko Ursulin <tvrtko.ursulin@...el.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>
Cc:     Linux-Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: linux-next: manual merge of the drm-intel tree with the
 drm-intel-fixes tree

Hi all,

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

  drivers/gpu/drm/i915/i915_gem.c

between commit:

  b85577b72837ee ("drm/i915: Order two completing nop_submit_request")

from the drm-intel-fixes tree and commit:

  af7a8ffad9c58d ("drm/i915: Use rcu instead of stop_machine in set_wedged")

from the drm-intel 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.

diff --cc drivers/gpu/drm/i915/i915_gem.c
index d5e58d4a5950,20fcac37c85a..000000000000
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@@ -3019,36 -3090,24 +3092,27 @@@ static void nop_submit_request(struct d
  	GEM_BUG_ON(!i915_terminally_wedged(&request->i915->gpu_error));
  	dma_fence_set_error(&request->fence, -EIO);
  
 -	i915_gem_request_submit(request);
 +	spin_lock_irqsave(&request->engine->timeline->lock, flags);
 +	__i915_gem_request_submit(request);
 +	intel_engine_init_global_seqno(request->engine, request->global_seqno);
 +	spin_unlock_irqrestore(&request->engine->timeline->lock, flags);
  }
  
- static void engine_set_wedged(struct intel_engine_cs *engine)
+ static void nop_complete_submit_request(struct drm_i915_gem_request *request)
  {
- 	/* We need to be sure that no thread is running the old callback as
- 	 * we install the nop handler (otherwise we would submit a request
- 	 * to hardware that will never complete). In order to prevent this
- 	 * race, we wait until the machine is idle before making the swap
- 	 * (using stop_machine()).
- 	 */
- 	engine->submit_request = nop_submit_request;
+ 	unsigned long flags;
  
- 	/* Mark all executing requests as skipped */
- 	engine->cancel_requests(engine);
+ 	GEM_BUG_ON(!i915_terminally_wedged(&request->i915->gpu_error));
+ 	dma_fence_set_error(&request->fence, -EIO);
  
- 	/* Mark all pending requests as complete so that any concurrent
- 	 * (lockless) lookup doesn't try and wait upon the request as we
- 	 * reset it.
- 	 */
- 	intel_engine_init_global_seqno(engine,
- 				       intel_engine_last_submit(engine));
+ 	spin_lock_irqsave(&request->engine->timeline->lock, flags);
+ 	__i915_gem_request_submit(request);
+ 	intel_engine_init_global_seqno(request->engine, request->global_seqno);
+ 	spin_unlock_irqrestore(&request->engine->timeline->lock, flags);
  }
  
- static int __i915_gem_set_wedged_BKL(void *data)
+ void i915_gem_set_wedged(struct drm_i915_private *i915)
  {
- 	struct drm_i915_private *i915 = data;
  	struct intel_engine_cs *engine;
  	enum intel_engine_id id;
  

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ