[PATCH] io_uring/sync: check unused sqe fields for fallocate
Yi Xie <[email protected]> Fri, 17 Jul 2026 10:13:12 +0800
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Zero check unused SQE fields addr3 and pad2 for fallocate. They're not needed now, but could be used sometime in the future. Signed-off-by: Yi Xie <[email protected]> --- io_uring/sync.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/io_uring/sync.c b/io_uring/sync.c index c850cbc40606..03fde759deaf 100644 --- a/io_uring/sync.c +++ b/io_uring/sync.c @@ -89,7 +89,8 @@ int io_fallocate_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_sync *sync = io_kiocb_to_cmd(req, struct io_sync); - if (sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in) + if (sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in || + sqe->addr3 || sqe->__pad2[0]) return -EINVAL; sync->off = READ_ONCE(sqe->off); -- 2.25.1