diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2025-07-02 15:29:08 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-07-08 11:59:56 -0600 |
| commit | 1b4dc1ff0a8887c2fbb83a48e87284375ab4b02a (patch) | |
| tree | 6f111a43b26cdfc6a313019d0762afdab54adc41 /io_uring | |
| parent | io_uring/zcrx: allocate sgtable for umem areas (diff) | |
| download | linux-1b4dc1ff0a8887c2fbb83a48e87284375ab4b02a.tar.gz linux-1b4dc1ff0a8887c2fbb83a48e87284375ab4b02a.zip | |
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>
Diffstat (limited to 'io_uring')
| -rw-r--r-- | io_uring/zcrx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index 3f3c8cbde61e..208d1943a9fd 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -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)]; } |
