[Intel-gfx] [PATCH] [v2] drm/i915: Fix another another use-after-free in do_switch

Chris Wilson chris at chris-wilson.co.uk
Sun Aug 10 10:04:10 CEST 2014


On Sat, Aug 09, 2014 at 01:15:16PM -0700, Ben Widawsky wrote:
> See the following for many more details.
> 
> commit acc240d41ea1ab9c488a79219fb313b5b46265ae
> Author: Daniel Vetter <daniel.vetter at ffwll.ch>
> Date:   Thu Dec 5 15:42:34 2013 +0100
> 
>     drm/i915: Fix use-after-free in do_switch
> 
> In this case, the issue is only for full PPGTT:
> do_switch
>   context_unref
>     ppgtt_release
>       i915_gpu_idle
> 	switch_to_default
> 	from changes to default context
> 
> This could be backported to the pre do_switch cleanup I did in this
> series. However, it's much cleaner and more obvious as a patch on top,
> so I'd really like to do this as a post cleanup patch.
> 
> v2: There was a bug in the original patch where the ring->last_context
> was set too early. I am not sure how this wasn't being hit when I sent
> this previously. Perhaps I tested the wrong patch previously.
> 
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>

Ok, I convinced myself that the you are fixing the bug you describe and
don't seem to be introducing a new one, so

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list