diff options
| author | Sage Weil <sage@inktank.com> | 2013-03-25 13:26:30 -0400 |
|---|---|---|
| committer | Sage Weil <sage@inktank.com> | 2013-05-02 00:17:15 -0400 |
| commit | e9966076cdd952e19f2dd4854cd719be0d7cbebc (patch) | |
| tree | c65c356996fcb0b58c5a9353011ae1cdc54ac577 /include/linux | |
| parent | 27859f9773e4a0b2042435b13400ee2c891a61f4 (diff) | |
libceph: wrap auth methods in a mutex
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ceph/auth.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ceph/auth.h b/include/linux/ceph/auth.h index c9c3b3abe4a3..5f3386844134 100644 --- a/include/linux/ceph/auth.h +++ b/include/linux/ceph/auth.h | |||
| @@ -78,6 +78,8 @@ struct ceph_auth_client { | |||
| 78 | u64 global_id; /* our unique id in system */ | 78 | u64 global_id; /* our unique id in system */ |
| 79 | const struct ceph_crypto_key *key; /* our secret key */ | 79 | const struct ceph_crypto_key *key; /* our secret key */ |
| 80 | unsigned want_keys; /* which services we want */ | 80 | unsigned want_keys; /* which services we want */ |
| 81 | |||
| 82 | struct mutex mutex; | ||
| 81 | }; | 83 | }; |
| 82 | 84 | ||
| 83 | extern struct ceph_auth_client *ceph_auth_init(const char *name, | 85 | extern struct ceph_auth_client *ceph_auth_init(const char *name, |
