Skip to content

Commit 1b4dc1f

Browse files
isilenceaxboe
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/c3c30a926a18436a399a1768f3cc86c76cd17fa7.1751466461.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent b84621d commit 1b4dc1f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

io_uring/zcrx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ static inline struct page *io_zcrx_iov_page(const struct net_iov *niov)
4444
{
4545
struct io_zcrx_area *area = io_zcrx_iov_to_area(niov);
4646

47+
lockdep_assert(!area->mem.is_dmabuf);
48+
4749
return area->mem.pages[net_iov_idx(niov)];
4850
}
4951

0 commit comments

Comments
 (0)