From: Sage Weil Date: Thu, 21 Aug 2014 20:05:35 +0000 (-0700) Subject: mon: fix occasional message leak after session reset X-Git-Tag: v0.85~13^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=19df386b2d36d716be2e6d02de0386fac9e7bc1f;p=ceph.git mon: fix occasional message leak after session reset Consider: - we get a message, put it on a wait list - the client session resets - we go back to process the message later and discard - _ms_dispatch returns false, but nobody drops the msg ref Since we call _ms_dispatch() a lot internally, we need to always return true when we are an internal caller. Fixes: #9176 Backport: firefly, dumpling Signed-off-by: Sage Weil --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 1c75c74268c0..94b2d8d8cacd 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -2939,8 +2939,9 @@ bool Monitor::_ms_dispatch(Message *m) return dispatch(s, m, false); } dout(1) << __func__ << " dropping stray message " << *m - << " from " << m->get_source_inst() << dendl; - return false; + << " from " << m->get_source_inst() << dendl; + m->put(); + return true; } if (!exited_quorum.is_zero() && !src_is_mon) {