From: Sage Weil Date: Mon, 17 Jun 2013 19:47:11 +0000 (-0700) Subject: msgr: clear_pipe inside pipe_lock on mark_down_all X-Git-Tag: v0.61.8~23^2~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8aafe131acadc22cb069f3d98bba6922ab09c749;p=ceph.git msgr: clear_pipe inside pipe_lock on mark_down_all Observed a segfault in rebind -> mark_down_all -> clear_pipe -> put that may have been due to a racing thread clearing the connection_state pointer. Do the clear_pipe() call under the protection of pipe_lock, as we do in all other contexts. Signed-off-by: Sage Weil (cherry picked from commit 5fc1dabfb3b2cbffdee3214d24d7769d6e440e45) Conflicts: src/msg/SimpleMessenger.cc --- diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index 148300f159c..dd6b1bd944b 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -562,6 +562,8 @@ void SimpleMessenger::mark_down_all() p->unregister_pipe(); p->pipe_lock.Lock(); p->stop(); + if (p->connection_state) + p->connection_state->clear_pipe(p); p->pipe_lock.Unlock(); } lock.Unlock();