Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Pavel Begunkov and committed by
Jens Axboe
437c2335 be7cab44

-7
-7
io_uring/register.c
··· 421 421 if (unlikely(ret)) 422 422 return ret; 423 423 424 - /* nothing to do, but copy params back */ 425 - if (p.sq_entries == ctx->sq_entries && p.cq_entries == ctx->cq_entries) { 426 - if (copy_to_user(arg, &p, sizeof(p))) 427 - return -EFAULT; 428 - return 0; 429 - } 430 - 431 424 size = rings_size(p.flags, p.sq_entries, p.cq_entries, 432 425 &sq_array_offset); 433 426 if (size == SIZE_MAX)