]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix radosgw will crash when service is restarted during lifecycle processing 16495/head
authorweiqiaomiao <wei.qiaomiao@zte.com.cn>
Sat, 22 Jul 2017 00:26:52 +0000 (08:26 +0800)
committerWei <wei.qiaomiao@zte.com.cn>
Mon, 24 Jul 2017 08:53:35 +0000 (16:53 +0800)
in RGWRados::finalize(), store->gc is destructed before store->lc, if this func is called
(by service restart or others) when lifecycle processing, the lifecycle still use store->gc,
the radosgw daemon will crash.

Fixes: http://tracker.ceph.com/issues/20756
Signed-off-by: Wei Qiaomiao <wei.qiaomiao@zte.com.cn>
src/rgw/rgw_rados.cc

index 566e5daeb1215c891978837310d6a7ca74b99414..19edd2be4dbad3dcd16cca393e5712f96311c255 100644 (file)
@@ -3713,14 +3713,14 @@ void RGWRados::finalize()
     delete async_rados;
   }
   
+  delete lc;
+  lc = NULL; 
+
   delete gc;
   gc = NULL;
 
   delete obj_expirer;
   obj_expirer = NULL;
-  
-  delete lc;
-  lc = NULL;
 
   delete rest_master_conn;