]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fix potential double free of SetSnapRequest instance 8676/head
authorrunsisi <runsisi@zte.com.cn>
Thu, 21 Apr 2016 06:48:55 +0000 (14:48 +0800)
committerrunsisi <runsisi@hust.edu.cn>
Fri, 22 Apr 2016 14:02:55 +0000 (22:02 +0800)
if image feature EXCLUSIVE_LOCK is not enabled we should not try to
initialize the exclusive lock, or we may end with two async Contexts
to finish the same SetSnapRequest instance

Fixes: http://tracker.ceph.com/issues/15571
Signed-off-by: runsisi <runsisi@zte.com.cn>
src/librbd/image/SetSnapRequest.cc

index ca10e457959e5edf9ad30aa0aced25b274027884..f30f4a97fe75a874e50d4458057896a456252269 100644 (file)
@@ -60,8 +60,8 @@ void SetSnapRequest<I>::send_init_exclusive_lock() {
     int r = 0;
     if (send_refresh_parent(&r) != nullptr) {
       send_complete();
-      return;
     }
+    return;
   }
 
   CephContext *cct = m_image_ctx.cct;