[PATCH] io_uring/sync: check unused sqe fields for fallocate
From: Yi Xie
Date: Thu Jul 16 2026 - 22:13:44 EST
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 <xieyi@xxxxxxxxxx>
---
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