Re: [PATCH net-next 0/3] net: use skb_share_check() in loopback selftest hooks

From: Nicolai Buchwitz

Date: Wed Oct 14 2026 - 17:06:29 EST


Hi Jakub

On October 14, 2026 10:06:18 PM GMT+02:00, Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>On Wed, 07 Oct 2026 20:29:21 +0200 Nicolai Buchwitz wrote:
>> 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.
>
>Wonder if we should follow up and rename skb_unshare to skb_unclone_full
>or some such? The "share" in the name is quite confusing for people who
>haven't been around for 10+ years..

Makes sense. _unclone_full still sounds a bit clonky, but I can't think of a better name right now. I will give it a thought and send a follow up :)

Regards,
Nicolai