This patch simply replaces __kfree_skb() in exit path with kfree_skb().
In tcp_rcv_state_process(), generally skbs should be destroyed only when
the ref count is zero.
That is the way things are supposed to be done in the kernel.
This change might reveals a memory leak of skb.
If it happens, it would be because someone doesn't deal with the skb properly.
Signed-off-by: Masayuki Nakagawa <[EMAIL PROTECTED]>
--- linux-2.6/net/ipv4/tcp_input.c.orig 2007-01-25 07:04:35.000000000 -0800
+++ linux-2.6/net/ipv4/tcp_input.c 2007-01-25 07:05:05.000000000 -0800
@@ -4423,8 +4423,6 @@ int tcp_rcv_state_process(struct sock *s
* in the interest of security over speed unless
* it's still in use.
*/
- kfree_skb(skb);
- return 0;
}
goto discard;
@@ -4634,7 +4632,7 @@ int tcp_rcv_state_process(struct sock *s
if (!queued) {
discard:
- __kfree_skb(skb);
+ kfree_skb(skb);
}
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html