]> git.hungrycats.org Git - linux/commit
io_uring: check for valid register opcode earlier
authorJens Axboe <axboe@kernel.dk>
Fri, 23 Dec 2022 13:37:08 +0000 (06:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 11:00:43 +0000 (12:00 +0100)
commit062615f41338e4a4ebc5fb60d6db9a8caec59bc4
tree34fd14602249e5b0e33d153610155ed52a1d4ee2
parentfcd2d199486033223e9b2a6a7f9a01dd0327eac3
io_uring: check for valid register opcode earlier

[ Upstream commit 343190841a1f22b96996d9f8cfab902a4d1bfd0e ]

We only check the register opcode value inside the restricted ring
section, move it into the main io_uring_register() function instead
and check it up front.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
io_uring/io_uring.c