mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
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: 00d9148127 ("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>
This commit is contained in:
parent
5d540e4508
commit
7496e658a7
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue