[ovs-dev] [PATCH 2/2] datapath: Fix WARN_ON sending GSO packets to userspace in Linux 2.6.22+.

Justin Pettit jpettit at nicira.com
Sat Sep 12 13:45:36 UTC 2009

On Sep 12, 2009, at 12:53 AM, Ben Pfaff wrote:

> +		err = skb_cow(skb, sizeof *header);
> +		if (err)
> +			goto err_kfree_nskb;

Is there a reason that this is not "err_kfree_skb"?  It seems like  
you'd need to free the original skb, which may not happen if nskb is  

> +err_kfree_skb:
> +	kfree_skb(skb);
> +err_kfree_nskb:
> +	while (nskb) {
> +		kfree_skb(skb);

Will this code path result in a double free of skb?  I'd think you'd  
want "skb = NULL" just after the first call to kfree_skb().

Other than these questions about error handling, it seems reasonable  
to me.  Ian's more familiar with the code and has a test case that  
triggers the problem, so I'll defer to him.


More information about the dev mailing list