]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osdc: self-managed snapshot helper should catch decode exception
authorJason Dillaman <dillaman@redhat.com>
Thu, 3 May 2018 19:23:44 +0000 (15:23 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 9 May 2018 15:31:41 +0000 (11:31 -0400)
Fixes: http://tracker.ceph.com/issues/24000
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/osdc/Objecter.cc

index cb2f2a6e454ae688f9747a39c46b12093d2cd4f7..e822d027a3aa5f3fb22c1acfdef67b867160430c 100644 (file)
@@ -3865,8 +3865,12 @@ struct C_SelfmanagedSnap : public Context {
   C_SelfmanagedSnap(snapid_t *ps, Context *f) : psnapid(ps), fin(f) {}
   void finish(int r) override {
     if (r == 0) {
-      bufferlist::iterator p = bl.begin();
-      decode(*psnapid, p);
+      try {
+        bufferlist::iterator p = bl.begin();
+        decode(*psnapid, p);
+      } catch (buffer::error&) {
+        r = -EIO;
+      }
     }
     fin->complete(r);
   }