From: Haomai Wang Date: Sat, 11 Jun 2016 05:39:23 +0000 (+0800) Subject: msg/async/AsyncConnection: make verify auth callback without connection lock X-Git-Tag: v10.2.3~108^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10004%2Fhead;p=ceph.git msg/async/AsyncConnection: make verify auth callback without connection lock Fixes: http://tracker.ceph.com/issues/16237 Signed-off-by: Haomai Wang (cherry picked from commit 2b7776545c3f87d7f54a53190e65ec48378eaa05) --- diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index 18430066d3f..14d24046d61 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -1675,6 +1675,8 @@ ssize_t AsyncConnection::handle_connect_msg(ceph_msg_connect &connect, bufferlis return _reply_accept(CEPH_MSGR_TAG_FEATURES, connect, reply, authorizer_reply); } + lock.Unlock(); + bool authorizer_valid; if (!async_msgr->verify_authorizer(this, peer_type, connect.authorizer_protocol, authorizer_bl, authorizer_reply, authorizer_valid, session_key) || !authorizer_valid) { @@ -1687,7 +1689,6 @@ ssize_t AsyncConnection::handle_connect_msg(ceph_msg_connect &connect, bufferlis ldout(async_msgr->cct, 10) << __func__ << " accept setting up session_security." << dendl; // existing? - lock.Unlock(); AsyncConnectionRef existing = async_msgr->lookup_conn(peer_addr); inject_delay();