]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/lc: Fix use-after-free in RGWLC::process 38691/head
authorSoumya Koduri <skoduri@redhat.com>
Tue, 22 Dec 2020 17:27:52 +0000 (22:57 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Mon, 18 Jan 2021 08:30:25 +0000 (14:00 +0530)
Fixed use-after-free issue with 'rgw::sal::LCSerializer lock'
in RGWLC::process.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
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: