]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: revoke rx_buffer on op_cancel 2427/head
authorSage Weil <sage@redhat.com>
Mon, 8 Sep 2014 20:44:57 +0000 (13:44 -0700)
committerSage Weil <sage@redhat.com>
Tue, 9 Sep 2014 20:01:41 +0000 (13:01 -0700)
If we cancel a read, revoke the rx buffers to avoid a use-after-free and/or
other undefined badness by using user buffers that may no longer be
present.

Fixes: #9362
Backport: firefly, dumpling
Reported-by: Matthias Kiefer <matthias.kiefer@1und1.de>
Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc

index e77ea89fca873fe8f0db098cfd1b461f2ab2cd8d..407c38e543f9d878e953e64d6294dbf7ff18a826 100644 (file)
@@ -1856,6 +1856,12 @@ int Objecter::op_cancel(OSDSession *s, ceph_tid_t tid, int r)
     return -ENOENT;
   }
 
+  if (s->con) {
+    ldout(cct, 20) << " revoking rx buffer for " << tid
+                  << " on " << s->con << dendl;
+    s->con->revoke_rx_buffer(tid);
+  }
+
   ldout(cct, 10) << __func__ << " tid " << tid << dendl;
   Op *op = p->second;
   if (op->onack) {