]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix segfault in RevokeThread during its shutdown procedure. 15033/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 23 Jun 2017 09:09:14 +0000 (05:09 -0400)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 25 Jul 2017 14:24:40 +0000 (10:24 -0400)
Fixes: http://tracker.ceph.com/issues/19831
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/rgw/rgw_keystone.h

index df5650c59274e81865f105e99bc415e7f7bd7cb8..3add9ae8a4c091b6905641e359ea644bbfd3a418 100644 (file)
@@ -12,6 +12,7 @@
 #include "rgw_common.h"
 #include "rgw_http_client.h"
 #include "common/Cond.h"
+#include "global/global_init.h"
 
 #include <atomic>
 
@@ -224,7 +225,7 @@ class TokenCache {
     friend class TokenCache;
     typedef RGWPostHTTPData RGWGetRevokedTokens;
 
-    CephContext * const cct;
+    CephContext* const cct;
     TokenCache* const cache;
     const rgw::keystone::Config& config;
 
@@ -239,12 +240,13 @@ class TokenCache {
         config(config),
         lock("rgw::keystone::TokenCache::RevokeThread") {
     }
+
     void *entry() override;
     void stop();
     int check_revoked();
   } revocator;
 
-  CephContext * const cct;
+  const boost::intrusive_ptr<CephContext> cct;
 
   std::string admin_token_id;
   std::string barbican_token_id;