public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Damien Lespiau <damien.lespiau@intel.com>,
	John.C.Harrison@Intel.com, Intel-GFX@Lists.FreeDesktop.Org
Subject: Re: [PATCH] drm/i915: Fix null pointer dereference in ring cleanup code
Date: Mon, 3 Nov 2014 13:54:00 +0100	[thread overview]
Message-ID: <20141103125400.GC26941@phenom.ffwll.local> (raw)
In-Reply-To: <20141031160735.GA23213@nuc-i3427.alporthouse.com>

On Fri, Oct 31, 2014 at 04:07:35PM +0000, Chris Wilson wrote:
> On Fri, Oct 31, 2014 at 02:52:40PM +0000, Damien Lespiau wrote:
> > On Fri, Oct 31, 2014 at 12:00:26PM +0000, John.C.Harrison@Intel.com wrote:
> > > From: John Harrison <John.C.Harrison@Intel.com>
> > > 
> > > If a ring failed to initialise for any reason then the error path would try to
> > > clean up all rings including those that had not yet been allocated. The ring
> > > clean up code did a check that the ring was valid before starting its work.
> > > Unfortunately, that was after it had already dereferenced the ring to obtain a
> > > dev_private pointer.
> > > 
> > > Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> > 
> > This looks good to me.
> 
> Really? These functions(!!!) are only called under controlled conditions...
> I would have been happy to see this follow my suggestion I made to fix
> this bug months ago.

Hm, do you mean to shuffle the ring_initialized checks into callers? Or
something else?

John's patch didn't look offensive really, so merged it for now.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-11-03 12:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 15:30 [PATCH] drm/i915: Fix execlist cleanup bug Dave Gordon
2014-10-31 11:43 ` John Harrison
2014-10-31 12:00   ` [PATCH] drm/i915: Fix null pointer dereference in ring cleanup code John.C.Harrison
2014-10-31 14:52     ` Damien Lespiau
2014-10-31 16:07       ` Chris Wilson
2014-11-03 12:54         ` Daniel Vetter [this message]
2014-11-03 20:39           ` Chris Wilson
2014-11-03 17:16       ` Dave Gordon

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=20141103125400.GC26941@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Intel-GFX@Lists.FreeDesktop.Org \
    --cc=John.C.Harrison@Intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=damien.lespiau@intel.com \
    /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