From e6508674cfd8659c4538932af9babb1a4efda24a Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Thu, 23 Jul 2020 20:17:20 +0300 Subject: [PATCH] io_uring: missed req_init_async() for IOSQE_ASYNC to #29608102 commit 3e863ea3bb1a2203ae648eb272db0ce6a1a2072c upstream. IOSQE_ASYNC branch of io_queue_sqe() is another place where an unitialised req->work can be accessed (i.e. prior io_req_init_async()). Nothing really bad though, it just looses IO_WQ_WORK_CONCURRENT flag. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe Signed-off-by: Jiufei Xue Reviewed-by: Joseph Qi --- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/io_uring.c b/fs/io_uring.c index 2b3e1df22238..fd19c8b80317 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5692,6 +5692,7 @@ static void io_queue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe) * Never try inline submit of IOSQE_ASYNC is set, go straight * to async execution. */ + io_req_init_async(req); req->work.flags |= IO_WQ_WORK_CONCURRENT; io_queue_async_work(req); } else { -- GitLab