mirror of
https://github.com/ceph/ceph
synced 2025-01-12 06:00:46 +00:00
msg/async: msgr2: fix mark_down vs accept race
Msgr2 version of PR #25823 Signed-off-by: Ricardo Dias <rdias@suse.com>
This commit is contained in:
parent
3093667b19
commit
f4beb0e7c4
@ -2391,6 +2391,14 @@ CtPtr ProtocolV2::handle_cephx_auth(bufferlist &auth_payload) {
|
||||
|
||||
connection->lock.lock();
|
||||
|
||||
if (state != ACCEPTING) {
|
||||
ldout(cct, 1) << __func__
|
||||
<< " state changed while accept, it must be mark_down"
|
||||
<< dendl;
|
||||
ceph_assert(state == CLOSED);
|
||||
return _fault();
|
||||
}
|
||||
|
||||
session_security.reset(
|
||||
get_auth_session_handler(cct, auth_method, session_key,
|
||||
connection_secret,
|
||||
@ -2456,6 +2464,14 @@ CtPtr ProtocolV2::handle_auth_request(char *payload, uint32_t length) {
|
||||
nullptr);
|
||||
connection->lock.lock();
|
||||
|
||||
if (state != ACCEPTING) {
|
||||
ldout(cct, 1) << __func__
|
||||
<< " state changed while accept, it must be mark_down"
|
||||
<< dendl;
|
||||
ceph_assert(state == CLOSED);
|
||||
return _fault();
|
||||
}
|
||||
|
||||
if (!authorizer_valid) {
|
||||
ldout(cct, 0) << __func__ << " got bad authorizer, auth_reply_len="
|
||||
<< authorizer_reply.length() << dendl;
|
||||
|
Loading…
Reference in New Issue
Block a user