io_uring/zcrx: assert area type in io_zcrx_iov_page

Add a simple debug assertion to io_zcrx_iov_page() making it's not
trying to return pages for a dmabuf area.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/c3c30a926a18436a399a1768f3cc86c76cd17fa7.1751466461.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
pull/1309/head
Pavel Begunkov 2025-07-02 15:29:08 +01:00 committed by Jens Axboe
parent b84621d96e
commit 1b4dc1ff0a
1 changed files with 2 additions and 0 deletions

View File

@ -44,6 +44,8 @@ static inline struct page *io_zcrx_iov_page(const struct net_iov *niov)
{
struct io_zcrx_area *area = io_zcrx_iov_to_area(niov);
lockdep_assert(!area->mem.is_dmabuf);
return area->mem.pages[net_iov_idx(niov)];
}