]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix error_repo segfault in data sync 10523/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 6 Jul 2016 13:15:29 +0000 (09:15 -0400)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Mon, 1 Aug 2016 08:12:19 +0000 (13:42 +0530)
commitdc963833af2d81984c7fd023f718f5b7e58a37dc
tree89695cafc497216640ccdcdb8ccea1cd9741dfda
parent894a5f8d878d4b267f80b90a4bffce157f2b4ba7
rgw: fix error_repo segfault in data sync

RGWDataSyncShardCR will only allocate an error_repo if it's doing
incremental sync, so RGWDataSyncSingleEntryCR needs to guard against a
null error_repo

also, RGWDataSyncShardCR::stop_spawned_services() was dropping the last
reference to the error_repo before calling drain_all(), which meant that
RGWDataSyncSingleEntryCR could still be holding a pointer. now uses a
boost::intrusive_ptr in RGWDataSyncSingleEntryCR to account for its
reference

Fixes: http://tracker.ceph.com/issues/16603
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 28609029cf1be2fc9f8c8e3f47320636db29014a)
src/rgw/rgw_data_sync.cc