dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] drm/i915: use after free on error path
Date: Fri, 19 Jul 2013 09:01:04 +0200	[thread overview]
Message-ID: <20130719070104.GC5615@phenom.ffwll.local> (raw)
In-Reply-To: <20130719054627.GA9729@elgon.mountain>

On Fri, Jul 19, 2013 at 08:46:27AM +0300, Dan Carpenter wrote:
> i915_gem_vma_destroy() frees its argument so we have to move the
> drm_mm_remove_node() call up a few lines.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Both applied, thanks for the patches.
-Daniel

> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 9a9a77a..f347ad5 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3161,9 +3161,9 @@ search_free:
>  	return 0;
>  
>  err_out:
> +	drm_mm_remove_node(&vma->node);
>  	i915_gem_vma_destroy(vma);
>  	i915_gem_object_unpin_pages(obj);
> -	drm_mm_remove_node(&vma->node);
>  	return ret;
>  }
>  

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

      reply	other threads:[~2013-07-19  7:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19  5:46 [patch 2/2] drm/i915: use after free on error path Dan Carpenter
2013-07-19  7:01 ` Daniel Vetter [this message]

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=20130719070104.GC5615@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=dan.carpenter@oracle.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox