Skip to content

Commit a050be6

Browse files
isilenceSasha Levin
authored andcommitted
io_uring/zcrx: check unsupported flags on import
[ Upstream commit 7496e65 ] 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: 00d9148 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 18afaff commit a050be6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

io_uring/zcrx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,8 @@ static int import_zcrx(struct io_ring_ctx *ctx,
677677
return -EINVAL;
678678
if (reg->if_rxq || reg->rq_entries || reg->area_ptr || reg->region_ptr)
679679
return -EINVAL;
680+
if (reg->flags & ~ZCRX_REG_IMPORT)
681+
return -EINVAL;
680682

681683
fd = reg->if_idx;
682684
CLASS(fd, f)(fd);

0 commit comments

Comments
 (0)