summaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
authorEric Dumazet2015-10-05 06:08:11 +0200
committerDavid S. Miller2015-10-05 11:45:27 +0200
commita1a5344ddbe8fd3e080013b317ac9a664490cfdf (patch)
tree75c793a05dd64db3df05f804e429bae45ead20d1 /net/dccp/ipv4.c
parentnet: use sk_fullsock() in __netdev_pick_tx() (diff)
downloadkernel-qcow2-linux-a1a5344ddbe8fd3e080013b317ac9a664490cfdf.tar.gz
kernel-qcow2-linux-a1a5344ddbe8fd3e080013b317ac9a664490cfdf.tar.xz
kernel-qcow2-linux-a1a5344ddbe8fd3e080013b317ac9a664490cfdf.zip
tcp: avoid two atomic ops for syncookies
inet_reqsk_alloc() is used to allocate a temporary request in order to generate a SYNACK with a cookie. Then later, syncookie validation also uses a temporary request. These paths already took a reference on listener refcount, we can avoid a couple of atomic operations. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 8910c9567719..8e99681c8189 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -595,7 +595,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
goto drop;
- req = inet_reqsk_alloc(&dccp_request_sock_ops, sk);
+ req = inet_reqsk_alloc(&dccp_request_sock_ops, sk, true);
if (req == NULL)
goto drop;