* [PATCH 1/1] io_uring/zcrx: recheck ifq on shutdown
@ 2025-02-19 10:08 Pavel Begunkov
2025-02-19 15:07 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2025-02-19 10:08 UTC (permalink / raw)
To: io-uring; +Cc: asml.silence, Kees Bakker
io_ring_exit_work() checks ifq before shutting it down and guarantees
that the pointer is stable, but instead of relying on rather complicated
synchronisation recheck the ifq pointer inside.
Reported-by: Kees Bakker <[email protected]>
Signed-off-by: Pavel Begunkov <[email protected]>
---
io_uring/zcrx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 026efb8dd381..a9eaab3fccf2 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -489,9 +489,9 @@ void io_shutdown_zcrx_ifqs(struct io_ring_ctx *ctx)
{
lockdep_assert_held(&ctx->uring_lock);
- if (ctx->ifq)
- io_zcrx_scrub(ctx->ifq);
-
+ if (!ctx->ifq)
+ return;
+ io_zcrx_scrub(ctx->ifq);
io_close_queue(ctx->ifq);
}
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] io_uring/zcrx: recheck ifq on shutdown
2025-02-19 10:08 [PATCH 1/1] io_uring/zcrx: recheck ifq on shutdown Pavel Begunkov
@ 2025-02-19 15:07 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2025-02-19 15:07 UTC (permalink / raw)
To: io-uring, Pavel Begunkov; +Cc: Kees Bakker
On Wed, 19 Feb 2025 10:08:01 +0000, Pavel Begunkov wrote:
> io_ring_exit_work() checks ifq before shutting it down and guarantees
> that the pointer is stable, but instead of relying on rather complicated
> synchronisation recheck the ifq pointer inside.
>
>
Applied, thanks!
[1/1] io_uring/zcrx: recheck ifq on shutdown
commit: bc674a04c47cc23ad7e12893cad6226ea8f7a8ec
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-19 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 10:08 [PATCH 1/1] io_uring/zcrx: recheck ifq on shutdown Pavel Begunkov
2025-02-19 15: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