io_uring: missed req_init_async() for IOSQE_ASYNC
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 23 Jul 2020 17:17:20 +0000 (20:17 +0300)
committerJens Axboe <axboe@kernel.dk>
Thu, 23 Jul 2020 17:20:55 +0000 (11:20 -0600)
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 <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c

index d99802ac166f332f682e1d2ecb371c19d7ee5fae..32b0064f806ef88466051d5ca01b3a7bce85f91c 100644 (file)
@@ -5730,6 +5730,7 @@ fail_req:
                 * 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 {