mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
Merge PR #25823 into master
* refs/pull/25823/head: msg/async/Protocol*: fix mark_down vs accept race Reviewed-by: Ricardo Dias <rdias@suse.com> Reviewed-by: Gregory Farnum <gfarnum@redhat.com> Reviewed-by: Greg Farnum <gfarnum@redhat.com>
This commit is contained in:
commit
2483b774f2
@ -1933,6 +1933,13 @@ CtPtr ProtocolV1::handle_connect_message_2() {
|
||||
need_challenge ? &authorizer_challenge : nullptr) ||
|
||||
!authorizer_valid) {
|
||||
connection->lock.lock();
|
||||
if (state != ACCEPTING_WAIT_CONNECT_MSG_AUTH) {
|
||||
ldout(cct, 1) << __func__
|
||||
<< " state changed while accept, it must be mark_down"
|
||||
<< dendl;
|
||||
ceph_assert(state == CLOSED);
|
||||
return _fault();
|
||||
}
|
||||
|
||||
if (need_challenge && !had_challenge && authorizer_challenge) {
|
||||
ldout(cct, 10) << __func__ << ": challenging authorizer" << dendl;
|
||||
|
@ -1980,6 +1980,13 @@ CtPtr ProtocolV2::handle_connect_message_2() {
|
||||
need_challenge ? &authorizer_challenge : nullptr) ||
|
||||
!authorizer_valid) {
|
||||
connection->lock.lock();
|
||||
if (state != ACCEPTING_WAIT_CONNECT_MSG_AUTH) {
|
||||
ldout(cct, 1) << __func__
|
||||
<< " state changed while accept, it must be mark_down"
|
||||
<< dendl;
|
||||
ceph_assert(state == CLOSED);
|
||||
return _fault();
|
||||
}
|
||||
|
||||
if (need_challenge && !had_challenge && authorizer_challenge) {
|
||||
ldout(cct, 10) << __func__ << ": challenging authorizer" << dendl;
|
||||
|
Loading…
Reference in New Issue
Block a user