io_uring: check for valid register opcode earlier
authorJens Axboe <axboe@kernel.dk>
Fri, 23 Dec 2022 13:37:08 +0000 (06:37 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 23 Dec 2022 13:40:32 +0000 (06:40 -0700)
commit343190841a1f22b96996d9f8cfab902a4d1bfd0e
treee29e5cbf826e156d7bd30f33900e6e3396da3e34
parent23fffb2f09ce1145cbd751801d45ba74acaa6542
io_uring: check for valid register opcode earlier

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