Skip to content

Commit

Permalink
osdc/Objecter: revoke rx_buffer on op_cancel
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
liewegas committed Sep 9, 2014
1 parent f295c1f commit 2305b28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/osdc/Objecter.cc
Expand Up @@ -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) {
Expand Down

0 comments on commit 2305b28

Please sign in to comment.