On 9/22/23 10:09 AM, Ming Lei wrote: > diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c > index 537795fddc87..52a455b67163 100644 > --- a/io_uring/uring_cmd.c > +++ b/io_uring/uring_cmd.c > @@ -90,7 +90,7 @@ int io_uring_cmd_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) > if (sqe->__pad1) > return -EINVAL; > > - ioucmd->flags = READ_ONCE(sqe->uring_cmd_flags); > + ioucmd->flags = READ_ONCE(sqe->uring_cmd_flags) & IORING_URING_CMD_MASK; > if (ioucmd->flags & ~IORING_URING_CMD_FIXED) > return -EINVAL; > Do we want to mask it here? If any of the upper bits are set at prep time, that should be an EINVAL condition. -- Jens Axboe