From: Soumya Koduri Date: Tue, 22 Dec 2020 17:27:52 +0000 (+0530) Subject: rgw/lc: Fix use-after-free in RGWLC::process X-Git-Tag: v16.2.0~43^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F40338%2Fhead;p=ceph.git rgw/lc: Fix use-after-free in RGWLC::process Fixed use-after-free issue with 'rgw::sal::LCSerializer lock' in RGWLC::process. Signed-off-by: Soumya Koduri (cherry picked from commit e54e68ad3c88766ac370dfe2bbb5b123e18a7392) --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 2275adfe81fc..dd1b9b1b4cca 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -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: