public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: io-uring@vger.kernel.org
Cc: asml.silence@gmail.com
Subject: [PATCH v2 5/6] io_uring/zcrx: assert area type in io_zcrx_iov_page
Date: Tue,  1 Jul 2025 14:27:31 +0100	[thread overview]
Message-ID: <c3c30a926a18436a399a1768f3cc86c76cd17fa7.1751376214.git.asml.silence@gmail.com> (raw)
In-Reply-To: <cover.1751376214.git.asml.silence@gmail.com>

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>
---
 io_uring/zcrx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index fbcec06a1fb0..fcc7550aa0fa 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)];
 }
 
-- 
2.49.0


  parent reply	other threads:[~2025-07-01 13:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 13:27 [PATCH v2 0/6] zcrx huge pages support Vol 1 Pavel Begunkov
2025-07-01 13:27 ` [PATCH v2 1/6] io_uring/zcrx: always pass page to io_zcrx_copy_chunk Pavel Begunkov
2025-07-01 13:27 ` [PATCH v2 2/6] io_uring/zcrx: return error from io_zcrx_map_area_* Pavel Begunkov
2025-07-01 13:27 ` [PATCH v2 3/6] io_uring/zcrx: introduce io_populate_area_dma Pavel Begunkov
2025-07-01 13:27 ` [PATCH v2 4/6] io_uring/zcrx: allocate sgtable for umem areas Pavel Begunkov
2025-07-01 13:27 ` Pavel Begunkov [this message]
2025-07-01 13:27 ` [PATCH v2 6/6] io_uring/zcrx: prepare fallback for larger chunks Pavel Begunkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c3c30a926a18436a399a1768f3cc86c76cd17fa7.1751376214.git.asml.silence@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox