]> Gentwo Git Trees - linux/.git/commit
io_uring: only publish fully handled mem region
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 16 Oct 2025 13:23:23 +0000 (14:23 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 20 Oct 2025 16:37:56 +0000 (10:37 -0600)
commit5b6d8a032e807c48a843fb81d9e3d74391f731ea
tree19b56c57b2acef182ee31f5ab914661b8a0c6adc
parentdec10a1ad1d5f9d46e7f6e7c8b414a805e00717c
io_uring: only publish fully handled mem region

io_register_mem_region() can try to remove a region right after
publishing it. This non-atomicity is annoying. Do it in two steps
similar to io_register_mem_region(), create memory first and publish it
once the rest of the handling is done. Remove now unused
io_create_region_mmap_safe(), which was assumed to be a temporary
solution from day one.

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/memmap.c
io_uring/memmap.h
io_uring/register.c