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

Ian Campbell Ian.Campbell at citrix.com
Mon Sep 14 09:00:22 UTC 2009


On Sat, 2009-09-12 at 14:45 +0100, Justin Pettit wrote:
> 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  
> null.
> 
> > +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.

I've added this patch locally and it seems to resolve the issue with the
skb_gso_segment related backtrace.

I'm not immediately convinced that the error paths are correct either,
although I've not really got my head around what is going on in that
loop yet.

Ian.






More information about the dev mailing list