mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
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>
This commit is contained in:
parent
68685fa20e
commit
3730aebbda
@ -3214,12 +3214,8 @@ static int io_validate_ext_arg(struct io_ring_ctx *ctx, unsigned flags,
|
|||||||
|
|
||||||
if (!(flags & IORING_ENTER_EXT_ARG))
|
if (!(flags & IORING_ENTER_EXT_ARG))
|
||||||
return 0;
|
return 0;
|
||||||
|
if (flags & IORING_ENTER_EXT_ARG_REG)
|
||||||
if (flags & IORING_ENTER_EXT_ARG_REG) {
|
return -EINVAL;
|
||||||
if (argsz != sizeof(struct io_uring_reg_wait))
|
|
||||||
return -EINVAL;
|
|
||||||
return PTR_ERR(io_get_ext_arg_reg(ctx, argp));
|
|
||||||
}
|
|
||||||
if (argsz != sizeof(arg))
|
if (argsz != sizeof(arg))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (copy_from_user(&arg, argp, sizeof(arg)))
|
if (copy_from_user(&arg, argp, sizeof(arg)))
|
||||||
|
Loading…
Reference in New Issue
Block a user