diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2024-11-15 17:54:39 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-11-15 17:58:34 +0100 |
commit | 3730aebbdac8770f64ab66eb5e7129bc8dae731d (patch) | |
tree | 2bcfc51d267f4250e7d57156244626cb42a6de78 /io_uring | |
parent | io_uring: fortify io_pin_pages with a warning (diff) | |
download | linux-3730aebbdac8770f64ab66eb5e7129bc8dae731d.tar.xz linux-3730aebbdac8770f64ab66eb5e7129bc8dae731d.zip |
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 <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/a35ecd919dbdc17bd5b7932273e317832c531b45.1731689588.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/io_uring.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index bd71782057de..464a70bde7e6 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -3214,12 +3214,8 @@ static int io_validate_ext_arg(struct io_ring_ctx *ctx, unsigned flags, if (!(flags & IORING_ENTER_EXT_ARG)) return 0; - - if (flags & IORING_ENTER_EXT_ARG_REG) { - if (argsz != sizeof(struct io_uring_reg_wait)) - return -EINVAL; - return PTR_ERR(io_get_ext_arg_reg(ctx, argp)); - } + if (flags & IORING_ENTER_EXT_ARG_REG) + return -EINVAL; if (argsz != sizeof(arg)) return -EINVAL; if (copy_from_user(&arg, argp, sizeof(arg))) |