]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: do not queue NULL dup_op
authorSage Weil <sage@inktank.com>
Sat, 10 May 2014 17:29:11 +0000 (10:29 -0700)
committerSage Weil <sage@inktank.com>
Mon, 19 May 2014 20:53:02 +0000 (13:53 -0700)
We call start_flush() with a NULL op in a couple different places.  Do not
put a NULL pointer on the dup_ops list or we will crash later.

Fixes: #8328
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 0d67f9b0695765824bdc4a65fbed88edf8ea232e)

src/osd/ReplicatedPG.cc

index 94eec05d44458eb5f9b2a5fac7f46f4d0398a4b7..4c1d7b66df3df30ac824b382fa485077861d4941 100644 (file)
@@ -6151,7 +6151,8 @@ int ReplicatedPG::start_flush(
       // nonblocking can join anything
       // blocking can only join a blocking flush
       dout(20) << __func__ << " piggybacking on existing flush " << dendl;
-      fop->dup_ops.push_back(op);
+      if (op)
+       fop->dup_ops.push_back(op);
       return -EAGAIN;   // clean up this ctx; op will retry later
     }