libceph: wrap auth methods in a mutex
commit e9966076cd upstream.
The auth code is called from a variety of contexts, include the mon_client
(protected by the monc's mutex) and the messenger callbacks (currently
protected by nothing). Avoid chaos by protecting all auth state with a
mutex. Nothing is blocking, so this should be simple and lightweight.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
aa80dd9dbe
commit
7f259658b1
@ -78,6 +78,8 @@ struct ceph_auth_client {
|
||||
u64 global_id; /* our unique id in system */
|
||||
const struct ceph_crypto_key *key; /* our secret key */
|
||||
unsigned want_keys; /* which services we want */
|
||||
|
||||
struct mutex mutex;
|
||||
};
|
||||
|
||||
extern struct ceph_auth_client *ceph_auth_init(const char *name,
|
||||
|
||||
Reference in New Issue
Block a user