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: v11.0.0~212^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2b7776545c3f87d7f54a53190e65ec48378eaa05;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 --- diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index 5ce6bea7fbbf..be4e542f2a4c 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -1677,6 +1677,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) { @@ -1689,7 +1691,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();