summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-09-16 15:27:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-13 15:36:51 -0500
commit910f3c2443bc9d902d3cb268cd88f268e7d9a45f (patch)
treee3d69944bba19677897689fc9b92959858758c80 /io_uring
parentb13e199e4b475b11925e348ea4a01f495cd92f31 (diff)
downloadlinux-910f3c2443bc9d902d3cb268cd88f268e7d9a45f.tar.gz
linux-910f3c2443bc9d902d3cb268cd88f268e7d9a45f.tar.bz2
linux-910f3c2443bc9d902d3cb268cd88f268e7d9a45f.zip
io_uring/zcrx: check all niovs filled with dma addresses
[ Upstream commit d7ae46b454eb05e3df0d46c2ac9c61416a4d9057 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'io_uring')
-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 2035c77a1635..23ffc95caa42 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -75,6 +75,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;
}