public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH 1/1] io_uring/rw: reissue only from the same task
@ 2025-01-07 14:11 Pavel Begunkov
  2025-01-07 14:31 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Begunkov @ 2025-01-07 14:11 UTC (permalink / raw)
  To: io-uring; +Cc: asml.silence

io_rw_should_reissue() tries to propagate EAGAIN back to io_uring when
happens off the submission path, which is when it's staying within the
same task, and so thread group checks don't make much sense.

Cc: [email protected]
Fixes: ef04688871f33 ("io_uring: don't block level reissue off completion path")
Signed-off-by: Pavel Begunkov <[email protected]>
---
 io_uring/rw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/rw.c b/io_uring/rw.c
index ca1b19d3d142..4d5aeff79130 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -485,7 +485,7 @@ static bool io_rw_should_reissue(struct io_kiocb *req)
 	 * Play it safe and assume not safe to re-import and reissue if we're
 	 * not in the original thread group (or in task context).
 	 */
-	if (!same_thread_group(req->tctx->task, current) || !in_task())
+	if (req->tctx->task != current || !in_task())
 		return false;
 	return true;
 }
-- 
2.47.1


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

end of thread, other threads:[~2025-01-07 18:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 14:11 [PATCH 1/1] io_uring/rw: reissue only from the same task Pavel Begunkov
2025-01-07 14:31 ` Jens Axboe
2025-01-07 18:01   ` Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox