提交 161fd65a 编写于 作者: S Sage Weil

ceph: invalidate_authorizer without con->mutex held

This fixes lock ABBA inversion, as the ->invalidate_authorizer()
op may need to take a lock (or even call back into the
messenger).
Signed-off-by: NSage Weil <sage@newdream.net>
上级 88d892a3
...@@ -1853,14 +1853,6 @@ static void ceph_fault(struct ceph_connection *con) ...@@ -1853,14 +1853,6 @@ static void ceph_fault(struct ceph_connection *con)
con->in_msg = NULL; con->in_msg = NULL;
} }
/*
* in case we faulted due to authentication, invalidate our
* current tickets so that we can get new ones.
*/
if (con->auth_retry && con->ops->invalidate_authorizer) {
dout("calling invalidate_authorizer()\n");
con->ops->invalidate_authorizer(con);
}
/* If there are no messages in the queue, place the connection /* If there are no messages in the queue, place the connection
* in a STANDBY state (i.e., don't try to reconnect just yet). */ * in a STANDBY state (i.e., don't try to reconnect just yet). */
...@@ -1890,6 +1882,15 @@ static void ceph_fault(struct ceph_connection *con) ...@@ -1890,6 +1882,15 @@ static void ceph_fault(struct ceph_connection *con)
out_unlock: out_unlock:
mutex_unlock(&con->mutex); mutex_unlock(&con->mutex);
out: out:
/*
* in case we faulted due to authentication, invalidate our
* current tickets so that we can get new ones.
*/
if (con->auth_retry && con->ops->invalidate_authorizer) {
dout("calling invalidate_authorizer()\n");
con->ops->invalidate_authorizer(con);
}
if (con->ops->fault) if (con->ops->fault)
con->ops->fault(con); con->ops->fault(con);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册