From: Pavel Begunkov Date: Mon, 23 Mar 2026 12:43:59 +0000 (+0000) Subject: io_uring/zcrx: warn on alloc with non-empty pp cache X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48f253d65d39a45d2eed395bf6b8ac3bb8b1e992;p=thirdparty%2Fkernel%2Flinux.git io_uring/zcrx: warn on alloc with non-empty pp cache Page pool ensures the cache is empty before asking to refill it. Warn if the assumption is violated. Signed-off-by: Pavel Begunkov Link: https://patch.msgid.link/9c9792d6e65f3780d57ff83b6334d341ed9a5f29.1774261953.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index a7790d609f40d..eca30f8461ccf 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -1075,8 +1075,8 @@ static netmem_ref io_pp_zc_alloc_netmems(struct page_pool *pp, gfp_t gfp) struct io_zcrx_ifq *ifq = io_pp_to_ifq(pp); /* pp should already be ensuring that */ - if (unlikely(pp->alloc.count)) - goto out_return; + if (WARN_ON_ONCE(pp->alloc.count)) + return 0; io_zcrx_ring_refill(pp, ifq); if (likely(pp->alloc.count))