summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-12-02 18:35:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-08 15:05:09 +0300
commitbd180ec81f73c3af8c6ce45a72f45a3365d493ce (patch)
treeaa050942b196db9a0666b65df6ecdd7779df2171 /net
parent9041d1e200c74ec613964d218c8f485db0cadbe2 (diff)
downloadlinux-bd180ec81f73c3af8c6ce45a72f45a3365d493ce.tar.xz
libceph: no need to drop con->mutex for ->get_authorizer()
commit b3bbd3f2ab19c8ca319003b4b51ce4c4ca74da06 upstream. ->get_authorizer(), ->verify_authorizer_reply(), ->sign_message() and ->check_message_signature() shouldn't be doing anything with or on the connection (like closing it or sending messages). Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Sage Weil <sage@redhat.com> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/messenger.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 4e669e6b94aa..aa124756f131 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1405,15 +1405,9 @@ static struct ceph_auth_handshake *get_connect_authorizer(struct ceph_connection
return NULL;
}
- /* Can't hold the mutex while getting authorizer */
- mutex_unlock(&con->mutex);
auth = con->ops->get_authorizer(con, auth_proto, con->auth_retry);
- mutex_lock(&con->mutex);
-
if (IS_ERR(auth))
return auth;
- if (con->state != CON_STATE_NEGOTIATING)
- return ERR_PTR(-EAGAIN);
con->auth_reply_buf = auth->authorizer_reply_buf;
con->auth_reply_buf_len = auth->authorizer_reply_buf_len;