diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2025-10-15 13:10:31 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-10-15 08:01:38 -0600 |
| commit | 437c23357d897f5b5b7d297c477da44b56654d46 (patch) | |
| tree | fd0cdce667850b99edf1f815834a6fde043ec485 | |
| parent | be7cab44ed099566c605a8dac686c3254db01b35 (diff) | |
io_uring: fix unexpected placement on same size resizing
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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | io_uring/register.c | 7 |
1 files changed, 0 insertions, 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) |
