* [PATCH 1/1] io_uring: fix unexpected placement on same size resizing
@ 2025-10-15 12:10 Pavel Begunkov
2025-10-15 14:02 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2025-10-15 12:10 UTC (permalink / raw)
To: io-uring; +Cc: asml.silence
There might be many reasons why a user is resizing a ring, e.g. moving
to huge pages or for some memory compaction using IORING_SETUP_NO_MMAP.
Don't bypass resizing, the user will definitely be surprised seeing 0
while the rings weren't actually moved to a new place.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
io_uring/register.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/io_uring/register.c b/io_uring/register.c
index 58d43d624856..2e4717f1357c 100644
--- a/io_uring/register.c
+++ b/io_uring/register.c
@@ -421,13 +421,6 @@ static int io_register_resize_rings(struct io_ring_ctx *ctx, void __user *arg)
if (unlikely(ret))
return ret;
- /* nothing to do, but copy params back */
- if (p.sq_entries == ctx->sq_entries && p.cq_entries == ctx->cq_entries) {
- if (copy_to_user(arg, &p, sizeof(p)))
- return -EFAULT;
- return 0;
- }
-
size = rings_size(p.flags, p.sq_entries, p.cq_entries,
&sq_array_offset);
if (size == SIZE_MAX)
--
2.49.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] io_uring: fix unexpected placement on same size resizing
2025-10-15 12:10 [PATCH 1/1] io_uring: fix unexpected placement on same size resizing Pavel Begunkov
@ 2025-10-15 14:02 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2025-10-15 14:02 UTC (permalink / raw)
To: io-uring, Pavel Begunkov
On Wed, 15 Oct 2025 13:10:31 +0100, Pavel Begunkov wrote:
> There might be many reasons why a user is resizing a ring, e.g. moving
> to huge pages or for some memory compaction using IORING_SETUP_NO_MMAP.
> Don't bypass resizing, the user will definitely be surprised seeing 0
> while the rings weren't actually moved to a new place.
>
>
Applied, thanks!
[1/1] io_uring: fix unexpected placement on same size resizing
commit: 437c23357d897f5b5b7d297c477da44b56654d46
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-15 14:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-15 12:10 [PATCH 1/1] io_uring: fix unexpected placement on same size resizing Pavel Begunkov
2025-10-15 14:02 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox