From 20cf5aab85ddfa8f58a1638925ccdfe4d57f3f69 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Tue, 13 Oct 2015 15:40:47 -0400 Subject: [PATCH] engines/rbd: potential re-use of active fio_rbd_iou Running multiple concurrent RBD jobs can result in a segfault attempting to retrieve the RBD AIO completion status from a prematurely reused fio_rbd_iou object. Signed-off-by: Jason Dillaman --- engines/rbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/rbd.c b/engines/rbd.c index 3688577f..2be9b556 100644 --- a/engines/rbd.c +++ b/engines/rbd.c @@ -185,14 +185,14 @@ static void _fio_rbd_finish_aiocb(rbd_completion_t comp, void *data) * a specific error. So we have to assume that it can't do * partial completions. */ - fri->io_complete = 1; - ret = rbd_aio_get_return_value(fri->completion); if (ret < 0) { io_u->error = ret; io_u->resid = io_u->xfer_buflen; } else io_u->error = 0; + + fri->io_complete = 1; } static struct io_u *fio_rbd_event(struct thread_data *td, int event) -- 2.25.1