[PATCH net 0/2] net: do not run out of frags in alloc_skb_with_frags()
From: Haishuang Yan
Date: Sat Nov 07 2026 - 21:07:33 EST
alloc_skb_with_frags() can fail with -ENOBUFS for a data_len that passed
its own size check, because it splits the tail into one frag per bit set
in its page count. With vhost-net + tun, a guest that sends a ~480-540K
GSO packet makes the vhost worker retry that packet forever (100% CPU,
device dead). Patch 1 fixes the split without changing any allocation
that works today; patch 2 adds a KUnit test that fails before patch 1.
Haishuang Yan (2):
net: do not run out of frags in alloc_skb_with_frags()
net: add a KUnit test for the alloc_skb_with_frags() tail split
net/core/net_test.c | 24 ++++++++++++++++++++++++
net/core/skbuff.c | 14 ++++++++++++--
2 files changed, 36 insertions(+), 2 deletions(-)
base-commit: 30c71476d842b094651bd7712f6c8ee8716147d0
--
2.43.0