* [PATCH] net: do not call sock_put() on TIMEWAIT sockets
@ 2013-10-02 4:04 Eric Dumazet
2013-10-02 21:06 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2013-10-02 4:04 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
commit 3ab5aee7fe84 ("net: Convert TCP & DCCP hash tables to use RCU /
hlist_nulls") incorrectly used sock_put() on TIMEWAIT sockets.
We should instead use inet_twsk_put()
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/ipv4/inet_hashtables.c | 2 +-
net/ipv6/inet6_hashtables.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 7bd8983..96da9c7 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -287,7 +287,7 @@ begintw:
if (unlikely(!INET_TW_MATCH(sk, net, acookie,
saddr, daddr, ports,
dif))) {
- sock_put(sk);
+ inet_twsk_put(inet_twsk(sk));
goto begintw;
}
goto out;
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index 32b4a16..066640e 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -116,7 +116,7 @@ begintw:
}
if (unlikely(!INET6_TW_MATCH(sk, net, saddr, daddr,
ports, dif))) {
- sock_put(sk);
+ inet_twsk_put(inet_twsk(sk));
goto begintw;
}
goto out;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: do not call sock_put() on TIMEWAIT sockets
2013-10-02 4:04 [PATCH] net: do not call sock_put() on TIMEWAIT sockets Eric Dumazet
@ 2013-10-02 21:06 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-10-02 21:06 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 01 Oct 2013 21:04:11 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> commit 3ab5aee7fe84 ("net: Convert TCP & DCCP hash tables to use RCU /
> hlist_nulls") incorrectly used sock_put() on TIMEWAIT sockets.
>
> We should instead use inet_twsk_put()
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Ugh, applied and queued up for -stable, thanks Eric!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-02 21:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 4:04 [PATCH] net: do not call sock_put() on TIMEWAIT sockets Eric Dumazet
2013-10-02 21:06 ` David 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).