IO-Uring Archive on lore.kernel.org
 help / color / 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	[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, back to index

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

IO-Uring Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/io-uring/0 io-uring/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 io-uring io-uring/ https://lore.kernel.org/io-uring \
		io-uring@vger.kernel.org
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.io-uring


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git