Skip to content

Commit 48f253d

Browse files
isilenceaxboe
authored andcommitted
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 <asml.silence@gmail.com> Link: https://patch.msgid.link/9c9792d6e65f3780d57ff83b6334d341ed9a5f29.1774261953.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 7df542a commit 48f253d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

io_uring/zcrx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,8 @@ static netmem_ref io_pp_zc_alloc_netmems(struct page_pool *pp, gfp_t gfp)
10751075
struct io_zcrx_ifq *ifq = io_pp_to_ifq(pp);
10761076

10771077
/* pp should already be ensuring that */
1078-
if (unlikely(pp->alloc.count))
1079-
goto out_return;
1078+
if (WARN_ON_ONCE(pp->alloc.count))
1079+
return 0;
10801080

10811081
io_zcrx_ring_refill(pp, ifq);
10821082
if (likely(pp->alloc.count))

0 commit comments

Comments
 (0)