io_uring_cmd_issue_blocking() punts to io-wq without copying the SQE off the submission queue, unlike the -EAGAIN and fallback paths. Copy the SQE into async data before queuing the work. Signed-off-by: Yang Xiuwei --- io_uring/uring_cmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index 7b25dcd9d05f..fe32311b2e51 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -326,6 +326,10 @@ void io_uring_cmd_issue_blocking(struct io_uring_cmd *ioucmd) { struct io_kiocb *req = cmd_to_io_kiocb(ioucmd); + if (!(req->flags & REQ_F_SQE_COPIED)) { + io_uring_cmd_sqe_copy(req); + req->flags |= REQ_F_SQE_COPIED; + } io_req_queue_iowq(req); } -- 2.25.1