There is a race condition (_egl_TSDMutex) introduced by recently merged
patch,
commit 36e638f3e4c70ed2a99a761be040f957d5d8028c
Author: Sun, Yi J yi.j.sun@intel.com
Date: Tue Jan 23 13:54:22 2018 +0800
Internal: fix memory leak in mesa.
This happens when it goes into _eglInitTSD then tries to acquire
_egl_TSDMutex, which is locked within the same thread because
'_egl_TSDInitialized' is set to EGL_FALSE already.
(_eglGetCurrentThread->_eglCheckedGetTSD->_eglInitTSD)
To avoid this, it is needed to postpone resetting of '_egl_TSDInitialized'
until it is finished to back up the current context.
There is a race condition (_egl_TSDMutex) introduced by recently merged patch,
commit 36e638f3e4c70ed2a99a761be040f957d5d8028c Author: Sun, Yi J yi.j.sun@intel.com Date: Tue Jan 23 13:54:22 2018 +0800
This happens when it goes into _eglInitTSD then tries to acquire _egl_TSDMutex, which is locked within the same thread because '_egl_TSDInitialized' is set to EGL_FALSE already. (_eglGetCurrentThread->_eglCheckedGetTSD->_eglInitTSD)
To avoid this, it is needed to postpone resetting of '_egl_TSDInitialized' until it is finished to back up the current context.
Signed-off-by: Dongwon Kim dongwon.kim@intel.com