From 22e2e7cff42970b00dc352513f1f138132f78d04 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 10 May 2014 10:29:11 -0700 Subject: [PATCH] osd/ReplicatedPG: do not queue NULL dup_op 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 (cherry picked from commit 0d67f9b0695765824bdc4a65fbed88edf8ea232e) --- src/osd/ReplicatedPG.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 94eec05d44458..4c1d7b66df3df 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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 } -- 2.39.5