All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, stable@kernel.org
Subject: Re: [PATCH] drm/i915: Repeat unbinding during free if interrupted (v3)
Date: Fri, 23 Jul 2010 17:25:23 +0200	[thread overview]
Message-ID: <20100723152522.GA4295@viiv.ffwll.ch> (raw)
In-Reply-To: <1279896884-29492-1-git-send-email-chris@chris-wilson.co.uk>

On Fri, Jul 23, 2010 at 03:54:44PM +0100, Chris Wilson wrote:
> If during the freeing of an object the unbind is interrupted by a system
> call, which is quite possible if we have outstanding GPU writes that
> must be flushed, the unbind is silently aborted. This still leaves the
> AGP region and backing pages allocated, and perhaps more importantly,
> the object remains upon the various lists exposing us to memory
> corruption.
> 
> I think this is the cause behind the use-after-free, such as
> 
>   Bug 15664 - Graphics hang and kernel backtrace when starting Azureus
>               with Compiz enabled
>   https://bugzilla.kernel.org/show_bug.cgi?id=15664
> 
> v2: Daniel Vetter reminded me that kernel space programming is never easy.
> We cannot simply spin to clear the pending signal and so must deferred
> the freeing of the object until later.
> v3: Run from the top level retire requests.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: stable@kernel.org

Cleaning up the deferred free list in retire_request looks much saner than
what I've had in mind when discussing this on irc.

Reviewed-By: Daniel Vetter <daniel@ffwll.ch>
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

  reply	other threads:[~2010-07-23 15:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23 13:39 [PATCH] drm/i915: Repeat unbinding during free if interrupted Chris Wilson
2010-07-23 14:48 ` [PATCH] drm/i915: Repeat unbinding during free if interrupted (v2) Chris Wilson
2010-07-23 14:54   ` [PATCH] drm/i915: Repeat unbinding during free if interrupted (v3) Chris Wilson
2010-07-23 15:25     ` Daniel Vetter [this message]
2010-07-23 17:39     ` [PATCH] drm/i915: Repeat unbinding during free if interrupted (v4) Chris Wilson
2010-07-23 18:20     ` [PATCH] drm/i915: Repeat unbinding during free if interrupted (v5) 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=20100723152522.GA4295@viiv.ffwll.ch \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@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 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.