summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-03-25 10:26:30 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-20 12:01:32 -0700
commit507761dc72908cfc95a18b4ffabfed746f9cfcd5 (patch)
tree5360697f70dd5a7f27efb85a329d770522d8e995 /include
parent1a14fad287936577daf0533caa94f5c5038842e7 (diff)
libceph: wrap auth methods in a mutex
commit e9966076cdd952e19f2dd4854cd719be0d7cbebc 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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ceph/auth.h2
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 {
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,