[Intel-gfx] [PATCH 09/11] drm/i915: fixup execbuf failure path

Daniel Vetter daniel at ffwll.ch
Fri Jan 15 14:56:33 CET 2010


On Fri, Jan 15, 2010 at 01:34:21PM +0000, Chris Wilson wrote:
> On Fri, 15 Jan 2010 13:08:59 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > On Fri, 15 Jan 2010 13:24:16 +0100, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> > > Objects were unconditionally unreferenced in the error path.
> > > Fix this up like with the object pinning.
> > > 
> > [snip]
> > 
> > > -	for (i = 0; i < args->buffer_count; i++) {
> > > +	for (i = 0; i < referenced; i++) {
> > >  		if (object_list[i]) {
> > >  			obj_priv = object_list[i]->driver_private;
> > >  			obj_priv->in_execbuffer = false;
> > 
> > If this is truly an issue, then why not take advantage of the
> > if(object_list[i]) ? The simplest fix here would be to just
> >   if (!object_list) break;
> > instead.
> 
> Apart from we no longer calloc the object_list, so it's not quite as
> simple as that.
> -ickle
Actually everything is all right, drop this patch.
drm_gem_object_unreference checks for NULL. It was just me being paranoid
and not through roughly checking the code.
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list