Skip to contentSkip to conversation

io_uring/zcrx: check unsupported flags on import

PATCH Applied Pavel Begunkov 2 participants 2 messages Feb 15

Subsystems (4)
lore
Share & tools
lore

Pavel Begunkov

author maintainer
#0 lore raw

PATCH 1/1 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.

Fixes 00d91481279fb ("io_uring/zcrx: share an ifq between rings")
---
 io_uring/zcrx.c | 2 ++
 1 file changed, 2 insertions(+)
io_uring/zcrx.c +2 -0
index 29ca1d897be9..13646d09885c 100644
@@ -702,6 +702,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);
Signature · 1 line
2.52.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Pavel Begunkov

The imoorted zcrx registration path checks for ZCRX_REG_IMPORT, as it should, but doesn't reject any unsupported flags. Fix that.

Applied, thanks!

[1/1] io_uring/zcrx: check unsupported flags on import

      commit: 7496e658a76a61758b20e27cea8abcfeafe3aec4

Best regards,

Signature · 1 line
Jens Axboe