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: move flags check to io_uring_sanitise_params

io_uring_sanitise_params() sanitises most of the setup flags invariants,
move the IORING_SETUP_FLAGS check from io_uring_setup() into it.

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
712fbe97 01405895

+3 -2
+3 -2
io_uring/io_uring.c
··· 3430 3430 { 3431 3431 unsigned flags = p->flags; 3432 3432 3433 + if (flags & ~IORING_SETUP_FLAGS) 3434 + return -EINVAL; 3435 + 3433 3436 /* There is no way to mmap rings without a real fd */ 3434 3437 if ((flags & IORING_SETUP_REGISTERED_FD_ONLY) && 3435 3438 !(flags & IORING_SETUP_NO_MMAP)) ··· 3694 3691 if (!mem_is_zero(&p.resv, sizeof(p.resv))) 3695 3692 return -EINVAL; 3696 3693 3697 - if (p.flags & ~IORING_SETUP_FLAGS) 3698 - return -EINVAL; 3699 3694 p.sq_entries = entries; 3700 3695 return io_uring_create(&p, params); 3701 3696 }