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: don't free never created regions

io_free_region() tolerates empty regions but there is no reason to that
either. If the first io_create_region() in io_register_resize_rings()
fails, just return the error without attempting to clean it up.

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
6e975297 0c89dbbc

+2 -3
+2 -3
io_uring/register.c
··· 432 432 rd.flags |= IORING_MEM_REGION_TYPE_USER; 433 433 } 434 434 ret = io_create_region(ctx, &n.ring_region, &rd, IORING_OFF_CQ_RING); 435 - if (ret) { 436 - io_register_free_rings(ctx, &n); 435 + if (ret) 437 436 return ret; 438 - } 437 + 439 438 n.rings = io_region_get_ptr(&n.ring_region); 440 439 441 440 /*