[PATCH] glx: Refcnt the GLXDrawable to avoid use after free with multiple FreeResource

Michel Dänzer michel at daenzer.net
Thu Dec 16 06:55:42 PST 2010

[ Dropping dri-devel list as this seems strictly an xserver issue ]

On Fre, 2010-12-10 at 14:49 +0100, Michel Dänzer wrote: 
> On Fre, 2010-12-10 at 13:38 +0000, Chris Wilson wrote: 
> > Although there may be more than one resource handles pointing to the
> > Drawable, we only want to destroy it once and only reference the
> > resource which may have just been deleted on the first instance.
> > 
> > v2: Apply fixes and combine with another bug fix from Michel Dänzer,
> >     https://bugs.freedesktop.org/show_bug.cgi?id=28181
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Kristian Høgsberg <krh at bitplanet.net>
> > Cc: Michel Dänzer <daenzer at vmware.com>
> Reviewed-by: Michel Dänzer <michel at daenzer.net>
> I'd wait for Kristian's review as well though.

Any take on this, Kristian?

FWIW it's been confirmed to fix
https://bugs.freedesktop.org/show_bug.cgi?id=28181 . I think there's a
good chance for other similar bugs as well.

Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

More information about the xorg-devel mailing list