From: John Spray Date: Mon, 25 Aug 2014 00:29:02 +0000 (+0100) Subject: common/Timer: fix deadlock in RWTimer::shutdown X-Git-Tag: v0.86~213^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ef442928649ce8a9af7629a57bbfec0258bf9049;p=ceph.git common/Timer: fix deadlock in RWTimer::shutdown Fixes: #9213 Signed-off-by: John Spray --- diff --git a/src/common/Timer.cc b/src/common/Timer.cc index e64d504557e0..6282eacec13d 100644 --- a/src/common/Timer.cc +++ b/src/common/Timer.cc @@ -231,7 +231,9 @@ void RWTimer::shutdown() lock.Lock(); cond.Signal(); lock.Unlock(); + rwlock.unlock(); thread->join(); + rwlock.get_write(); delete thread; thread = NULL; }