]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: potential use after free on refresh error 9952/head
authorMykola Golub <mgolub@mirantis.com>
Mon, 27 Jun 2016 11:45:02 +0000 (14:45 +0300)
committerJason Dillaman <dillaman@redhat.com>
Mon, 27 Jun 2016 11:50:18 +0000 (07:50 -0400)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit e92b3950cd261d36de422ccaa4a2441d41c80d0c)

src/librbd/AioImageRequestWQ.cc

index fba79339fb74012ecf6c98f07d3ad03eb557b033..22ad364273568a15584f367ce57bea3840660879 100644 (file)
@@ -460,9 +460,8 @@ void AioImageRequestWQ::handle_refreshed(int r, AioImageRequest<> *req) {
                  << "req=" << req << dendl;
   if (r < 0) {
     req->fail(r);
-    delete req;
-
     finish_queued_op(req);
+    delete req;
     finish_in_flight_op();
   } else {
     // since IO was stalled for refresh -- original IO order is preserved