io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.8] io_uring: missed req_init_async() for IOSQE_ASYNC
@ 2020-07-23 17:17 Pavel Begunkov
  2020-07-23 18:07 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2020-07-23 17:17 UTC (permalink / raw)
  To: Jens Axboe, io-uring

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>
---
 fs/io_uring.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index d99802ac166f..32b0064f806e 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5730,6 +5730,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 {
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 5.8] io_uring: missed req_init_async() for IOSQE_ASYNC
  2020-07-23 17:17 [PATCH 5.8] io_uring: missed req_init_async() for IOSQE_ASYNC Pavel Begunkov
@ 2020-07-23 18:07 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2020-07-23 18:07 UTC (permalink / raw)
  To: Pavel Begunkov, io-uring

On 7/23/20 11:17 AM, Pavel Begunkov wrote:
> 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.

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-23 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 17:17 [PATCH 5.8] io_uring: missed req_init_async() for IOSQE_ASYNC Pavel Begunkov
2020-07-23 18:07 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).