Date: Mon, 30 Sep 2019 07:42:59 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r352893 - stable/11/lib/libthr/thread Message-ID: <201909300742.x8U7gxu4020481@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Sep 30 07:42:59 2019 New Revision: 352893 URL: https://svnweb.freebsd.org/changeset/base/352893 Log: MFC r352620: Fix destruction of the robust mutexes. Modified: stable/11/lib/libthr/thread/thr_mutex.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libthr/thread/thr_mutex.c ============================================================================== --- stable/11/lib/libthr/thread/thr_mutex.c Mon Sep 30 07:42:07 2019 (r352892) +++ stable/11/lib/libthr/thread/thr_mutex.c Mon Sep 30 07:42:59 2019 (r352893) @@ -469,7 +469,11 @@ _pthread_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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909300742.x8U7gxu4020481>