]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/AsyncConnection: make verify auth callback without connection lock 10004/head
authorHaomai Wang <haomai@xsky.com>
Sat, 11 Jun 2016 05:39:23 +0000 (13:39 +0800)
committerLoic Dachary <ldachary@redhat.com>
Wed, 29 Jun 2016 08:37:23 +0000 (10:37 +0200)
Fixes: http://tracker.ceph.com/issues/16237
Signed-off-by: Haomai Wang <haomai@xsky.com>
(cherry picked from commit 2b7776545c3f87d7f54a53190e65ec48378eaa05)

src/msg/async/AsyncConnection.cc

index 18430066d3ff31ed0a01f851bdb6a569e854bd20..14d24046d61be68195125f73e7beb78762e339e3 100644 (file)
@@ -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();