svn commit: r352900 - releng/12.1/lib/libthr/thread
Konstantin Belousov
kib at FreeBSD.org
Mon Sep 30 14:16:45 UTC 2019
Author: kib
Date: Mon Sep 30 14:16:44 2019
New Revision: 352900
URL: https://svnweb.freebsd.org/changeset/base/352900
Log:
MFC r352620, MFS12 r352892:
Fix destruction of the robust mutexes.
Approved by: re (gjb)
Modified:
releng/12.1/lib/libthr/thread/thr_mutex.c
Directory Properties:
releng/12.1/ (props changed)
Modified: releng/12.1/lib/libthr/thread/thr_mutex.c
==============================================================================
--- releng/12.1/lib/libthr/thread/thr_mutex.c Mon Sep 30 14:11:49 2019 (r352899)
+++ releng/12.1/lib/libthr/thread/thr_mutex.c Mon Sep 30 14:16:44 2019 (r352900)
@@ -474,7 +474,11 @@ _thr_mutex_destroy(pthread_mutex_t *mutex)
if (m == THR_PSHARED_PTR) {
m1 = __thr_pshared_offpage(mutex, 0);
if (m1 != NULL) {
- mutex_assert_not_owned(_get_curthread(), m1);
+ if ((uint32_t)m1->m_lock.m_owner !=
+ UMUTEX_RB_OWNERDEAD) {
+ mutex_assert_not_owned(
+ _get_curthread(), m1);
+ }
__thr_pshared_destroy(mutex);
}
*mutex = THR_MUTEX_DESTROYED;
More information about the svn-src-releng
mailing list