summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2026-02-15 21:29:12 +0000
committerJens Axboe <axboe@kernel.dk>2026-02-15 14:55:29 -0700
commit7496e658a76a61758b20e27cea8abcfeafe3aec4 (patch)
treeeab09e682bd278b29cd695fe1b738e7b945f797c
parent5d540e4508950c674d6feef1d95463d039bbf4f5 (diff)
io_uring/zcrx: check unsupported flags on import
The imoorted zcrx registration path checks for ZCRX_REG_IMPORT, as it should, but doesn't reject any unsupported flags. Fix that. Cc: stable@vger.kernel.org Fixes: 00d91481279fb ("io_uring/zcrx: share an ifq between rings") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--io_uring/zcrx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index b24d1da2e1ca..dda863e5e8b7 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -677,6 +677,8 @@ static int import_zcrx(struct io_ring_ctx *ctx,
return -EINVAL;
if (reg->if_rxq || reg->rq_entries || reg->area_ptr || reg->region_ptr)
return -EINVAL;
+ if (reg->flags & ~ZCRX_REG_IMPORT)
+ return -EINVAL;
fd = reg->if_idx;
CLASS(fd, f)(fd);