On 03/16/2014 07:10 AM, Emil Velikov wrote: > With commit 1f1928db001(glx: Drop _Xglobal_lock while we create and > initialize glx display) we've split the big _Xglobal_lock handling in > a more fine grained manner. > > Unfortunatelly we forgot to drop the unlock_mutex on the error paths, > leading to undefined behaviour as the mutex is already unlocked. > > Cc: Kristian Høgsberg <k...@bitplanet.net> > Cc: "9.2 10.0 10.1" <mesa-sta...@lists.freedesktop.org> > Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>
Sorry for not looking at this sooner... I checked the code, and this patch is obviously correct. The lock was released just a few lines earlier (outside the patch). Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> > --- > src/glx/glxext.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/src/glx/glxext.c b/src/glx/glxext.c > index 4a195bd..de73036 100644 > --- a/src/glx/glxext.c > +++ b/src/glx/glxext.c > @@ -826,7 +826,6 @@ __glXInitialize(Display * dpy) > dpyPriv->codes = XInitExtension(dpy, __glXExtensionName); > if (!dpyPriv->codes) { > free(dpyPriv); > - _XUnlockMutex(_Xglobal_lock); > return NULL; > } > > @@ -842,7 +841,6 @@ __glXInitialize(Display * dpy) > &dpyPriv->majorVersion, &dpyPriv->minorVersion) > || (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion < 1)) { > free(dpyPriv); > - _XUnlockMutex(_Xglobal_lock); > return NULL; > } > > @@ -907,7 +905,7 @@ __glXInitialize(Display * dpy) > dpyPriv->next = glx_displays; > glx_displays = dpyPriv; > > - _XUnlockMutex(_Xglobal_lock); > + _XUnlockMutex(_Xglobal_lock); > > return dpyPriv; > } > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev