All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Clear execbuf's vma backpointer upon release
Date: Thu, 22 Jun 2017 12:36:37 +0100	[thread overview]
Message-ID: <646bb8a1-e8f5-cddd-ac20-3c08fc404603@linux.intel.com> (raw)
In-Reply-To: <20170622104722.2583-1-chris@chris-wilson.co.uk>


On 22/06/2017 11:47, Chris Wilson wrote:
> commit 2889caa92321 ("drm/i915: Eliminate lots of iterations over the
> execobjects array") jiggled around the error handling and replace a test
> that we cleaned up properly after ourselves with an assertion. That
> assertion failed because in the release function (moments after the
> assertion) we were indeed forgetting to mark the vma as cleared. The
> consequence was when testing an invalid relocation address, we would try
> to release the vma twice (following the couple of attempts to verify the
> address) and on the second release notice that the first release was
> incomplete.
> 
> Testcase: igt/gem_reloc_overflow/invalid-address
> Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index b2457556591c..ec33b358fba9 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -879,6 +879,7 @@ static void eb_release_vmas(const struct i915_execbuffer *eb)
>   
>   		GEM_BUG_ON(vma->exec_entry != entry);
>   		vma->exec_entry = NULL;
> +		__exec_to_vma(entry) = 0;
>   
>   		if (entry->flags & __EXEC_OBJECT_HAS_PIN)
>   			__eb_unreserve_vma(vma, entry);
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-06-22 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22 10:47 [PATCH] drm/i915: Clear execbuf's vma backpointer upon release Chris Wilson
2017-06-22 11:03 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-06-22 11:36 ` Tvrtko Ursulin [this message]
2017-06-22 12:01   ` [PATCH] " Chris Wilson

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=646bb8a1-e8f5-cddd-ac20-3c08fc404603@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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.