summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-09-16 15:27:50 +0100
committerJens Axboe <axboe@kernel.dk>2025-09-16 12:37:20 -0600
commitd7ae46b454eb05e3df0d46c2ac9c61416a4d9057 (patch)
treeff7ece5f814d0c49002804a155014dc7f6959e5a
parent01464ea405e13789bf4f14c7d4e9fa97f0885d46 (diff)
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>
-rw-r--r--io_uring/zcrx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index ef8d60b92646..0f15e0fa5467 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -77,6 +77,9 @@ static int io_populate_area_dma(struct io_zcrx_ifq *ifq,
niov_idx++;
}
}
+
+ if (WARN_ON_ONCE(niov_idx != area->nia.num_niovs))
+ return -EFAULT;
return 0;
}