Skip to content

Commit 3730aeb

Browse files
isilenceaxboe
authored andcommitted
io_uring: disable ENTER_EXT_ARG_REG for IOPOLL
IOPOLL doesn't use the extended arguments, no need for it to support IORING_ENTER_EXT_ARG_REG. Let's disable it for IOPOLL, if anything it leaves more space for future extensions. Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/a35ecd919dbdc17bd5b7932273e317832c531b45.1731689588.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 68685fa commit 3730aeb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

io_uring/io_uring.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3214,12 +3214,8 @@ static int io_validate_ext_arg(struct io_ring_ctx *ctx, unsigned flags,
32143214

32153215
if (!(flags & IORING_ENTER_EXT_ARG))
32163216
return 0;
3217-
3218-
if (flags & IORING_ENTER_EXT_ARG_REG) {
3219-
if (argsz != sizeof(struct io_uring_reg_wait))
3220-
return -EINVAL;
3221-
return PTR_ERR(io_get_ext_arg_reg(ctx, argp));
3222-
}
3217+
if (flags & IORING_ENTER_EXT_ARG_REG)
3218+
return -EINVAL;
32233219
if (argsz != sizeof(arg))
32243220
return -EINVAL;
32253221
if (copy_from_user(&arg, argp, sizeof(arg)))

0 commit comments

Comments
 (0)