From 8cae07c10b9cb62af87d494724586c945f181127 Mon Sep 17 00:00:00 2001 From: runsisi Date: Thu, 21 Apr 2016 14:48:55 +0800 Subject: [PATCH] librbd: fix potential double free of SetSnapRequest instance 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 (cherry picked from commit 0a6eaac12fe29762c3dd29068f9427840cfea100) --- src/librbd/image/SetSnapRequest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librbd/image/SetSnapRequest.cc b/src/librbd/image/SetSnapRequest.cc index ca10e457959e5..f30f4a97fe75a 100644 --- a/src/librbd/image/SetSnapRequest.cc +++ b/src/librbd/image/SetSnapRequest.cc @@ -60,8 +60,8 @@ void SetSnapRequest::send_init_exclusive_lock() { int r = 0; if (send_refresh_parent(&r) != nullptr) { send_complete(); - return; } + return; } CephContext *cct = m_image_ctx.cct; -- 2.39.5