xserver-multidpi/glx
Jon TURNEY bc71081f0e glx: Fix crash when a client exits without deleting GL contexts
With the previous patches applied, we now have crash due to use-after-free when
a client exits without deleting all it's GL contexts

On client exit, CloseDownClient first calls glxClientCallback() with
ClientStateGone, which calls __glXFreeContext() directly.

Subsequently CloseDownClient() frees all the clients resources, which leads to
ContextGone() being called for a context resource where the context has already
been freed.

Fix this by modifiying glxClientCallback() to free the context resource.

Also make __glXFreeContext() static, as calling it directly leads to this
problem, instead the context resource should be released.

With the previous patches applied, this can be demonstrated with e.g. glxinfo,
which doesn't delete it's context before exit.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-12-05 16:41:49 +00:00
..
clientinfo.c glx: Implement GLX SetClientInfo2ARB protocol 2012-07-05 11:44:09 -07:00
createcontext.c Merge remote-tracking branch 'idr/glx-float-fbconfig' 2013-10-29 09:37:30 -07:00
extension_string.c glx: Enable GLX_ARB_fbconfig_float for DRI2 drivers 2013-10-24 11:48:04 -07:00
extension_string.h glx: Enable GLX_ARB_fbconfig_float for DRI2 drivers 2013-10-24 11:48:04 -07:00
glxbyteorder.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
glxcmds.c Revert "glx: Simplify glXDestroyContext" 2014-12-05 16:37:28 +00:00
glxcmdsswap.c glx: convert to direct GL dispatch (v2) 2013-10-29 12:29:16 -04:00
glxcontext.h glx: Fix memory leak in context garbage collection (v2) 2013-10-29 10:30:43 -04:00
glxdrawable.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
glxdri2.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
glxdricommon.c glx: Clear new FBConfig attributes to 0 by default. 2014-03-10 13:57:21 -07:00
glxdricommon.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
glxdriswrast.c glx: Fix 'y ' value in swrastGetDrawableInfo() 2014-09-11 17:51:12 -07:00
glxext.c glx: Fix crash when a client exits without deleting GL contexts 2014-12-05 16:41:49 +00:00
glxext.h glx: Fix crash when a client exits without deleting GL contexts 2014-12-05 16:41:49 +00:00
glxscreens.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
glxscreens.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
glxserver.h glx: Move the GLX variable caching what GL context is current to dix. 2014-04-23 10:32:02 -07:00
glxutil.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
indirect_dispatch_swap.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_dispatch.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_dispatch.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_program.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_reqsize.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_reqsize.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_size_get.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_size_get.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_size.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_table.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_table.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_texture_compression.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_util.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
indirect_util.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
Makefile.am glx: Remove function stubs 2013-12-10 08:03:22 -08:00
render2.c glx: Convert non-generated function pointer thunking 2013-12-10 08:02:42 -08:00
render2swap.c glx: Convert non-generated function pointer thunking 2013-12-10 08:02:42 -08:00
renderpix.c glx: convert to direct GL dispatch (v2) 2013-10-29 12:29:16 -04:00
renderpixswap.c glx: convert to direct GL dispatch (v2) 2013-10-29 12:29:16 -04:00
rensize.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
single2.c glx: convert to direct GL dispatch (v2) 2013-10-29 12:29:16 -04:00
single2swap.c glx: convert to direct GL dispatch (v2) 2013-10-29 12:29:16 -04:00
singlepix.c glx: convert to direct GL dispatch (v2) 2013-10-29 12:29:16 -04:00
singlepixswap.c glx: convert to direct GL dispatch (v2) 2013-10-29 12:29:16 -04:00
singlesize.c glx: convert to direct GL dispatch (v2) 2013-10-29 12:29:16 -04:00
singlesize.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
swap_interval.c glx: convert to direct GL dispatch (v2) 2013-10-29 12:29:16 -04:00
unpack.h Remove unneccesary casts from WriteToClient calls 2012-07-09 19:12:56 -07:00
xfont.c glx: convert to direct GL dispatch (v2) 2013-10-29 12:29:16 -04:00