]> Gentwo Git Trees - linux/.git/commitdiff
io_uring/kbuf: use io_create_region for kbuf creation
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 16 Oct 2025 13:23:22 +0000 (14:23 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 20 Oct 2025 16:37:56 +0000 (10:37 -0600)
kbuf ring is published by io_buffer_add_list(), which correctly protects
with mmap_lock, there is no need to use io_create_region_mmap_safe()
before as the region is not yet exposed to the userspace via mmap.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/kbuf.c

index aad655e386720357af9611b5a11baa1ff177b213..e271b44ff73e60ea886f7bb155c7531d35920e73 100644 (file)
@@ -630,7 +630,7 @@ int io_register_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg)
                rd.user_addr = reg.ring_addr;
                rd.flags |= IORING_MEM_REGION_TYPE_USER;
        }
-       ret = io_create_region_mmap_safe(ctx, &bl->region, &rd, mmap_offset);
+       ret = io_create_region(ctx, &bl->region, &rd, mmap_offset);
        if (ret)
                goto fail;
        br = io_region_get_ptr(&bl->region);