Re: [PATCH net-next v6] net: Implement fault injection forcing skb reallocation
From: Guillaume Nault
Date: Fri Nov 08 2024 - 11:04:05 EST
On Thu, Nov 07, 2024 at 08:11:44AM -0800, Breno Leitao wrote:
> Introduce a fault injection mechanism to force skb reallocation. The
> primary goal is to catch bugs related to pointer invalidation after
> potential skb reallocation.
Nice to see this kind of debug option being worked on!
> +static bool should_fail_net_realloc_skb(struct sk_buff *skb)
> +{
> + struct net_device *net = skb->dev;
It's confusing to see a variable called "net" pointing to a struct
net_device. "net" generally refers to struct net.
In case v7 is needed, it'd be nice to call this variable "dev".
Looks good to me otherwise.
Acked-by: Guillaume Nault <gnault@xxxxxxxxxx>