The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: atlantic: fix two ring teardown leaks
@ 2026-08-02 15:44 Yangyu Chen
  2026-08-02 15:46 ` [PATCH net 1/2] net: atlantic: free stranded TX buffers on ring deinit Yangyu Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yangyu Chen @ 2026-08-02 15:44 UTC (permalink / raw)
  To: Sukhdeep Singh, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Mina Almasry, Jesper Dangaard Brouer, Richard Cochran,
	Lino Sanfilippo, Igor Russkikh, Simon Horman, netdev, bpf,
	linux-kernel, stable, Yangyu Chen

These are the two fixes from the page_pool conversion series [1],
resent against net as requested in the review of that series. The
page_pool conversion itself stays in net-next and is not part of this
posting; it depends on these fixes, but they stand on their own.

Both patches are unchanged from [1] apart from the collected
Reviewed-by tags, and each carries a Fixes tag and a Cc: stable with
the affected range (patch 1: v4.11+, patch 2: v5.2+). They apply and
were build- and runtime-tested independently of each other and of the
conversion.

Patch 1: aq_vec_deinit() drains the TX rings with a single
aq_ring_tx_clean() call, which is capped at AQ_CFG_TX_CLEAN_BUDGET
descriptors and stops at hw_head, frozen once the hardware and NAPI
have been stopped. Everything beyond that keeps its skb or xdp_frame
when the interface goes down and is lost when the buffer ring is
freed.

Patch 2: aq_ring_rx_deinit() only walks [sw_head, sw_tail). Since the
page reuse strategy was added, a cleaned RX buffer keeps its page for
reuse and refill is batched, so consumed but not yet reposted slots
accumulate in the [sw_tail, sw_head) gap and their pages and DMA
mappings are never released.

Reproduction logs for both leaks (as page_pool stalled shutdowns,
which is how they become visible) are in the notes of the respective
patches.

[1] https://lore.kernel.org/lkml/tencent_1F173E0FC1606D2AC704DC9C98AF10984607@qq.com/

Yangyu Chen (2):
  net: atlantic: free stranded TX buffers on ring deinit
  net: atlantic: free RX pages of consumed but not refilled buffers

 .../net/ethernet/aquantia/atlantic/aq_ring.c  | 51 +++++++++++++++++--
 .../net/ethernet/aquantia/atlantic/aq_ring.h  |  1 +
 .../net/ethernet/aquantia/atlantic/aq_vec.c   |  2 +-
 3 files changed, 49 insertions(+), 5 deletions(-)


base-commit: af39eb111ce6b5eba9c08513b62c4868eb7e7fd5
-- 
2.47.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-08-05  1:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-02 15:44 [PATCH net 0/2] net: atlantic: fix two ring teardown leaks Yangyu Chen
2026-08-02 15:46 ` [PATCH net 1/2] net: atlantic: free stranded TX buffers on ring deinit Yangyu Chen
2026-08-03 18:31   ` Mina Almasry
2026-08-02 15:46 ` [PATCH net 2/2] net: atlantic: free RX pages of consumed but not refilled buffers Yangyu Chen
2026-08-03 18:35   ` Mina Almasry
2026-08-05  1:20 ` [PATCH net 0/2] net: atlantic: fix two ring teardown leaks patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox