Re: [PATCH net v1] netmem: prevent TX of unreadable skbs

From: Jakub Kicinski
Date: Wed Mar 05 2025 - 22:12:05 EST


On Tue, 4 Mar 2025 23:49:24 +0000 Mina Almasry wrote:
> @@ -3914,6 +3914,9 @@ static struct sk_buff *validate_xmit_skb(struct sk_buff *skb, struct net_device
>
> skb = validate_xmit_xfrm(skb, features, again);
>
> + if (!skb_frags_readable(skb))
> + goto out_kfree_skb;

I'd put this new check at the beginning rather than the end.
Feeding unreadable packets into GSO will not result in
much happiness.