about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-10-03 00:27:47 -0400
committerRich Felker <dalias@aerifal.cx>2011-10-03 00:27:47 -0400
commit5e977e8b48c6862767ea0a1255233600957c05db (patch)
treef66f6986c250e59e513874e5d941aa846b8f7f28
parentb6f9974ad843b6b106db082fc44e710c0eb06e3b (diff)
downloadmusl-5e977e8b48c6862767ea0a1255233600957c05db.tar.gz
musl-5e977e8b48c6862767ea0a1255233600957c05db.tar.xz
musl-5e977e8b48c6862767ea0a1255233600957c05db.zip
recovering ownerdead robust mutex must reset recursive lock count
-rw-r--r--src/thread/pthread_mutex_trylock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/thread/pthread_mutex_trylock.c b/src/thread/pthread_mutex_trylock.c
index fb277970..db784a73 100644
--- a/src/thread/pthread_mutex_trylock.c
+++ b/src/thread/pthread_mutex_trylock.c
@@ -43,6 +43,7 @@ int pthread_mutex_trylock(pthread_mutex_t *m)
 	self->robust_list.head = &m->_m_next;
 	self->robust_list.pending = 0;
 	if (own) {
+		m->_m_count = 0;
 		m->_m_type += 8;
 		return EOWNERDEAD;
 	}