]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/Timer: fix deadlock in RWTimer::shutdown
authorJohn Spray <john.spray@redhat.com>
Mon, 25 Aug 2014 00:29:02 +0000 (01:29 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 25 Aug 2014 00:34:20 +0000 (01:34 +0100)
Fixes: #9213
Signed-off-by: John Spray <john.spray@redhat.com>
src/common/Timer.cc

index e64d504557e0f6831696a2390e9f4cfb51064d75..6282eacec13d6930d0cdc152fc2ecd35559de48b 100644 (file)
@@ -231,7 +231,9 @@ void RWTimer::shutdown()
     lock.Lock();
     cond.Signal();
     lock.Unlock();
+    rwlock.unlock();
     thread->join();
+    rwlock.get_write();
     delete thread;
     thread = NULL;
   }