* [PATCH] io_uring/sync: check unused sqe fields for fallocate
@ 2026-07-17 2:13 Yi Xie
2026-07-20 8:23 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Yi Xie @ 2026-07-17 2:13 UTC (permalink / raw)
To: axboe; +Cc: io-uring, linux-kernel, Yi Xie
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@kylinos.cn>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-20 8:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-17 2:13 [PATCH] io_uring/sync: check unused sqe fields for fallocate Yi Xie
2026-07-20 8:23 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.