Skip to content

Commit d7ae46b

Browse files
isilenceaxboe
authored andcommitted
io_uring/zcrx: check all niovs filled with dma addresses
Add a warning if io_populate_area_dma() can't fill in all net_iovs, it should never happen. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 01464ea commit d7ae46b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

io_uring/zcrx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ static int io_populate_area_dma(struct io_zcrx_ifq *ifq,
7777
niov_idx++;
7878
}
7979
}
80+
81+
if (WARN_ON_ONCE(niov_idx != area->nia.num_niovs))
82+
return -EFAULT;
8083
return 0;
8184
}
8285

0 commit comments

Comments
 (0)