Skip to content

Commit

Permalink
libceph: no need to drop con->mutex for ->get_authorizer()
Browse files Browse the repository at this point in the history
->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>
  • Loading branch information
Ilya Dryomov committed Dec 12, 2016
1 parent 0dde584 commit b3bbd3f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,15 +1393,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;
Expand Down

0 comments on commit b3bbd3f

Please sign in to comment.