public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v3 0/2] xsk: Fixes for AF_XDP fragment handling
@ 2026-02-17  1:22 Nikhil P. Rao
  2026-02-17  1:22 ` [PATCH net v3 1/2] xsk: Fix fragment node deletion to prevent buffer leak Nikhil P. Rao
  2026-02-17  1:22 ` [PATCH net v3 2/2] xsk: Fix zero-copy AF_XDP fragment drop Nikhil P. Rao
  0 siblings, 2 replies; 5+ messages in thread
From: Nikhil P. Rao @ 2026-02-17  1:22 UTC (permalink / raw)
  To: netdev
  Cc: nikhil.rao, magnus.karlsson, maciej.fijalkowski, sdf, davem,
	edumazet, kuba, pabeni, horms, kerneljasonxing

This series fixes two issues in AF_XDP zero-copy fragment handling:

Patch 1 fixes a buffer leak caused by incorrect list node handling after
commit b692bf9a7543. The list_node field is now reused for both the xskb
pool list and the buffer free list. Using list_del() instead of
list_del_init() causes list_empty() checks in xp_free() to fail, preventing
buffers from being added to the free list.

Patch 2 fixes partial packet delivery to userspace. In the zero-copy path,
if the Rx queue fills up while enqueuing fragments, the remaining fragments
are dropped, causing the application to receive incomplete packets. The fix
ensures the Rx queue has sufficient space for all fragments before starting
to enqueue them.

v3 changes:
 - Patch 1: Carried Acked-by tags from v1 on patch 1
 - Patch 2:
   * Check for free space only for the multi-buffer case, this preserves
     single buffer performance (Maciej)
   * Fix return without freeing buffer when sufficient space for all
     fragments is not available

v2 changes:
 - Fix indentation issue reported by kernel test robot [1]

[1] https://lore.kernel.org/oe-kbuild-all/202602051720.YfZO23pZ-lkp@intel.com/




Nikhil P. Rao (2):
  xsk: Fix fragment node deletion to prevent buffer leak
  xsk: Fix zero-copy AF_XDP fragment drop

 include/net/xdp_sock_drv.h |  6 +++---
 net/xdp/xsk.c              | 24 +++++++++++++++---------
 2 files changed, 18 insertions(+), 12 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-02-17 12:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-17  1:22 [PATCH net v3 0/2] xsk: Fixes for AF_XDP fragment handling Nikhil P. Rao
2026-02-17  1:22 ` [PATCH net v3 1/2] xsk: Fix fragment node deletion to prevent buffer leak Nikhil P. Rao
2026-02-17  1:22 ` [PATCH net v3 2/2] xsk: Fix zero-copy AF_XDP fragment drop Nikhil P. Rao
2026-02-17 11:11   ` Maciej Fijalkowski
2026-02-17 12:39   ` kernel test robot

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