[PATCH net-2.6.24] [L2TP] Fix lockup introduced by recent changes

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <netdev@...>
Cc: <herbert@...>, <davem@...>, <mostrows@...>, <paulus@...>
Date: Tuesday, September 18, 2007 - 5:44 pm

[L2TP] Fix double skb free problem introduced by recent changes 

This patch is to be applied on top of Herbert's recent patch set:
"[PPP 3/3] L2TP: Fix skb handling in pppol2tp_xmit"

It fixes a double kfree_skb() issue introduced by that patch. Also
return 0 on error, allowing PPP to requeue the skb.

Signed-off-by: James Chapman <jchapman@katalix.com>

Index: net-2.6.24/drivers/net/pppol2tp.c
===================================================================
--- net-2.6.24.orig/drivers/net/pppol2tp.c
+++ net-2.6.24/drivers/net/pppol2tp.c
@@ -1066,11 +1066,10 @@ static int pppol2tp_xmit(struct ppp_chan
 		session->stats.tx_errors++;
 	}
 
-	/* Free the original skb */
-abort:
-	kfree_skb(skb);
-
 	return 1;
+
+abort:
+	return 0;
 }
 
 /*****************************************************************************
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH net-2.6.24] [L2TP] Fix lockup introduced by recent ch..., James Chapman, (Tue Sep 18, 5:44 pm)