]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/lc: Fix use-after-free in RGWLC::process 40338/head
authorSoumya Koduri <skoduri@redhat.com>
Tue, 22 Dec 2020 17:27:52 +0000 (22:57 +0530)
committerCasey Bodley <cbodley@redhat.com>
Tue, 23 Mar 2021 11:53:11 +0000 (07:53 -0400)
Fixed use-after-free issue with 'rgw::sal::LCSerializer lock'
in RGWLC::process.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit e54e68ad3c88766ac370dfe2bbb5b123e18a7392)

src/rgw/rgw_lc.cc

index 2275adfe81fcae1e68f24629a59eea2a4eafc3d6..dd1b9b1b4ccaf880f24e038c11ae1ca4794a83bf 100644 (file)
@@ -1804,11 +1804,11 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker,
            << dendl;
 
     lock->unlock();
-    delete lock;
     ret = bucket_lc_process(entry.bucket, worker, thread_stop_at(), once);
     bucket_lc_post(index, max_lock_secs, entry, ret, worker);
   } while(1 && !once);
 
+  delete lock;
   return 0;
 
 exit: