Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] net: use skb_share_check() in loopback selftest hooks
@ 2026-10-07 18:29 Nicolai Buchwitz
  2026-10-07 18:29 ` [PATCH net-next 1/3] net: selftests: use skb_share_check() in the loopback receive hook Nicolai Buchwitz
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nicolai Buchwitz @ 2026-10-07 18:29 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Oleksij Rempel, Maxime Chevallier, Andrew Lunn,
	Maxime Coquelin, Alexandre Torgue, Jose Abreu, Saeed Mahameed,
	Tariq Toukan, Mark Bloch, Leon Romanovsky, Dragos Tatulea,
	Alexei Lazar
  Cc: netdev, linux-kernel, linux-stm32, linux-arm-kernel, linux-rdma,
	Nicolai Buchwitz

The loopback selftest hooks can get a shared skb when another handler
is bound to the device. Linearizing a non-linear frame then hits
BUG_ON(skb_shared()) in pskb_expand_head().

Stumbled over this on RPi CM4 (bcmgenet, with jumbo series applied +
WIP selftest patches) with a packet socket open at the same time as
running ethtool -t.

stmmac and mlx5 seem to have the same pattern, xgbe already handles
shared skbs. Patches 2 and 3 are compile tested only.

As the impact is pretty limited and doesn't seem to bother anyone in
the wild, I've chosen net-next, but kept the Fixes tags. That matches
what Paolo suggested during the LPC track.

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
Nicolai Buchwitz (3):
      net: selftests: use skb_share_check() in the loopback receive hook
      net: stmmac: selftests: use skb_share_check() in the loopback receive hook
      net/mlx5e: use skb_share_check() in the loopback selftest hook

 drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c  | 4 ++++
 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 +-
 net/core/selftests.c                                   | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)
---
base-commit: 45ad84d2800e4a092fb8d96006a533b2d0ab13f6
change-id: 20261007-nb-net-selftest-shared-net-823dc91ed5bf

Best regards,
--  
Nicolai Buchwitz <nb@tipi-net.de>


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

end of thread, other threads:[~2026-10-09  8:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07 18:29 [PATCH net-next 0/3] net: use skb_share_check() in loopback selftest hooks Nicolai Buchwitz
2026-10-07 18:29 ` [PATCH net-next 1/3] net: selftests: use skb_share_check() in the loopback receive hook Nicolai Buchwitz
2026-10-08 21:31   ` netdev-bot+sashiko
2026-10-09  6:49     ` Nicolai Buchwitz
2026-10-07 18:29 ` [PATCH net-next 2/3] net: stmmac: " Nicolai Buchwitz
2026-10-07 18:29 ` [PATCH net-next 3/3] net/mlx5e: use skb_share_check() in the loopback selftest hook Nicolai Buchwitz
2026-10-08 21:31   ` netdev-bot+sashiko
2026-10-09  8:37     ` Nicolai Buchwitz

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