]> 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>
Sat, 10 May 2014 17:29:11 +0000 (10:29 -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>
src/osd/ReplicatedPG.cc

index 5bf24cc606d8842656a71131cb188c2a89fe5b0b..11470e0120a07ab095bf18c79b8222d3951a94af 100644 (file)
@@ -6153,7 +6153,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
     }