From: Chris Wilson Subject: Re: [PATCH 1/3] drm/i915: Rely on accurate request tracking for finding hung batches Date: Wed, 12 Feb 2014 17:47:49 +0000 Message-ID: <20140212174749.GD14909@nuc-i3427.alporthouse.com> References: <1392042651-3278-1-git-send-email-mika.kuoppala@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (mail.fireflyinternet.com [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 40993FAF04 for ; Wed, 12 Feb 2014 09:48:04 -0800 (PST) Content-Disposition: inline In-Reply-To: <1392042651-3278-1-git-send-email-mika.kuoppala@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Mika Kuoppala Cc: intel-gfx@lists.freedesktop.org, miku@iki.fi, Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Mon, Feb 10, 2014 at 04:30:49PM +0200, Mika Kuoppala wrote: > From: Chris Wilson > > + request = i915_gem_find_active_request(ring); > + if (request) { > + /* We need to copy these to an anonymous buffer as the simplest > + * method to avoid being overwritten by userspace. > + */ > + return i915_error_object_create(dev_priv, request->batch_obj, request->ctx->vm); This needs to protect against ctx == NULL, e.g. request->ctx ? request->ctx->vm : &dev_priv->gtt.base) -Chris -- Chris Wilson, Intel Open Source Technology Centre