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/kbuf: use io_create_region for kbuf creation

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>

authored by

Pavel Begunkov and committed by
Jens Axboe
dec10a1a 6e975297

+1 -1
+1 -1
io_uring/kbuf.c
··· 630 630 rd.user_addr = reg.ring_addr; 631 631 rd.flags |= IORING_MEM_REGION_TYPE_USER; 632 632 } 633 - ret = io_create_region_mmap_safe(ctx, &bl->region, &rd, mmap_offset); 633 + ret = io_create_region(ctx, &bl->region, &rd, mmap_offset); 634 634 if (ret) 635 635 goto fail; 636 636 br = io_region_get_ptr(&bl->region);