From: Jason Dillaman Date: Tue, 13 Oct 2015 19:40:47 +0000 (-0400) Subject: engines/rbd: potential re-use of active fio_rbd_iou X-Git-Tag: fio-2.2.11~22 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=20cf5aab85ddfa8f58a1638925ccdfe4d57f3f69 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 --- 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)