diff options
author | Eric Dumazet <edumazet@google.com> | 2015-10-14 14:16:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-16 03:52:18 -0400 |
commit | f03f2e154f52fdaa982de7e2c386737679963dc9 (patch) | |
tree | f88db80f207233d0b5eef878687bc032f89f9269 /net/ipv4/tcp_ipv4.c | |
parent | ef84d8ce5a36d0c4a6454e7e9dff54d19f96a25f (diff) |
tcp/dccp: add inet_csk_reqsk_queue_drop_and_put() helper
Let's reduce the confusion about inet_csk_reqsk_queue_drop() :
In many cases we also need to release reference on request socket,
so add a helper to do this, reducing code size and complexity.
Fixes: 4bdc3d66147b ("tcp/dccp: fix behavior of stale SYN_RECV request sockets")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index aad2298de7ad..9c68cf3762c4 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1591,7 +1591,7 @@ process: | |||
1591 | if (likely(sk->sk_state == TCP_LISTEN)) { | 1591 | if (likely(sk->sk_state == TCP_LISTEN)) { |
1592 | nsk = tcp_check_req(sk, skb, req, false); | 1592 | nsk = tcp_check_req(sk, skb, req, false); |
1593 | } else { | 1593 | } else { |
1594 | inet_csk_reqsk_queue_drop(sk, req); | 1594 | inet_csk_reqsk_queue_drop_and_put(sk, req); |
1595 | goto lookup; | 1595 | goto lookup; |
1596 | } | 1596 | } |
1597 | if (!nsk) { | 1597 | if (!nsk) { |