* [PATCH 2.6] reference count cleanup continued -IPv6
@ 2004-03-31 15:33 Nivedita Singhvi
2004-04-01 7:12 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Nivedita Singhvi @ 2004-03-31 15:33 UTC (permalink / raw)
To: davem; +Cc: netdev
Continuing the reference count clean up, this time
in tcp_v6_rcv(). We should not be doing a sock_put()
on a socket in TIMEWAIT state.
Applies to 2.6.4. Should apply to current bits as
well.
thanks,
Nivedita
diff -urN linux-2.6.4/net/ipv6/tcp_ipv6.c linux-2.6.4mc6/net/ipv6/tcp_ipv6.c
--- linux-2.6.4/net/ipv6/tcp_ipv6.c 2004-03-10 18:55:28.000000000 -0800
+++ linux-2.6.4mc6/net/ipv6/tcp_ipv6.c 2004-03-30 10:34:25.000000000 -0800
@@ -1639,7 +1639,7 @@
no_tcp_socket:
if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))
- goto discard_and_relse;
+ goto discard_it;
if (skb->len < (th->doff<<2) || tcp_checksum_complete(skb)) {
bad_packet:
@@ -1662,12 +1662,14 @@
goto discard_it;
do_time_wait:
- if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))
- goto discard_and_relse;
+ if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
+ tcp_tw_put((struct tcp_tw_bucket *) sk);
+ goto discard_it;
+ }
if (skb->len < (th->doff<<2) || tcp_checksum_complete(skb)) {
TCP_INC_STATS_BH(TcpInErrs);
- sock_put(sk);
+ tcp_tw_put((struct tcp_tw_bucket *) sk);
goto discard_it;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-01 7:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-31 15:33 [PATCH 2.6] reference count cleanup continued -IPv6 Nivedita Singhvi
2004-04-01 7:12 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).