Thread (10 messages) 10 messages, 5 authors, 2007-09-19

Re: [PATCH 3/3] [PPP] L2TP: Fix skb handling in pppol2tp_xmit

From: James Chapman <jchapman@katalix.com>
Date: 2007-09-19 08:44:05

Possibly related (same subject, not in this thread)

Herbert Xu wrote:
On Tue, Sep 18, 2007 at 09:19:33PM +0100, James Chapman wrote:
quoted
This one causes my test system to lock up. I'll investigate. Please 
don't apply this patch for now.
Sorry, I added a double-free on the skb after ip_queue_xmit.
Please try this one instead.
 >
-	/* Free the original skb */
-	kfree_skb(skb);
-
 	return 1;
 
-discard:
-	/* Free the new skb. Caller will free original skb. */
-	if (skb2 != skb)
-		kfree_skb(skb2);
 abort:
-	return 0;
+	/* Free the original skb */
+	kfree_skb(skb);
+	return 1;
 }
Shouldn't this return 0 in the error case and without the kfree_skb()? 
This lets ppp requeue the skb.

-- 
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help