bionic/x86: fix one potential deadlock in __set_tls()
Fix bug: Currently the mutex lock _tls_desc_lock is not released when __set_thread_area() fails. That will leads to the deadlock when __set_tls( ) is called later on. Change-Id: Iea3267cb0659971cba7766cbc3346f6924274f86 Signed-off-by: Jin Wei <wei.a.jin@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
This commit is contained in:
parent
f9c5afb1f9
commit
c5393b23f6
@ -83,6 +83,7 @@ int __set_tls(void *ptr)
|
||||
if (rc != 0)
|
||||
{
|
||||
/* could not set thread local area */
|
||||
pthread_mutex_unlock(&_tls_desc_lock);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user