From: Sage Weil Date: Tue, 26 Feb 2019 19:30:33 +0000 (-0600) Subject: mon: handle racing ms_handle_reset and handle_auth_request X-Git-Tag: v14.1.1~112^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26678%2Fhead;p=ceph.git mon: handle racing ms_handle_reset and handle_auth_request Signed-off-by: Sage Weil --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index c4d8aaf4adba6..8592a4667ae43 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -6240,6 +6240,11 @@ int Monitor::handle_auth_request( &auth_meta->connection_secret); } else { priv = con->get_priv(); + if (!priv) { + // this can happen if the async ms_handle_reset event races with + // the unlocked call into handle_auth_request + return -EACCES; + } s = static_cast(priv.get()); r = s->auth_handler->handle_request( p,