mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: do not run out of frags in alloc_skb_with_frags()
@ 2026-11-08 10:06 Haishuang Yan
  2026-11-08 10:06 ` [PATCH net 1/2] " Haishuang Yan
  2026-11-08 10:06 ` [PATCH net 2/2] net: add a KUnit test for the alloc_skb_with_frags() tail split Haishuang Yan
  0 siblings, 2 replies; 5+ messages in thread
From: Haishuang Yan @ 2026-11-08 10:06 UTC (permalink / raw)
  To: netdev
  Cc: davem, edumazet, kuba, pabeni, horms, willemb, mst, jasowangio,
	eperezma, willemdebruijn.kernel, linux-kernel, Haishuang Yan

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




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

end of thread, other threads:[~2026-11-08  8:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08 10:06 [PATCH net 0/2] net: do not run out of frags in alloc_skb_with_frags() Haishuang Yan
2026-11-08 10:06 ` [PATCH net 1/2] " Haishuang Yan
2026-11-08  8:20   ` Narcisa Vasile
2026-11-08 10:06 ` [PATCH net 2/2] net: add a KUnit test for the alloc_skb_with_frags() tail split Haishuang Yan
2026-11-08  8:24   ` Narcisa Vasile

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

all inboxes | Powered by JetHome®