diff options
author | Eric Dumazet <edumazet@google.com> | 2015-10-04 21:08:11 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-05 02:45:27 -0700 |
commit | a1a5344ddbe8fd3e080013b317ac9a664490cfdf (patch) | |
tree | 75c793a05dd64db3df05f804e429bae45ead20d1 /net/ipv4/syncookies.c | |
parent | 004a5d0140ce1d05c1f5fce5df4baa2717a330e0 (diff) | |
download | linux-a1a5344ddbe8fd3e080013b317ac9a664490cfdf.tar.bz2 |
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/ipv4/syncookies.c')
-rw-r--r-- | net/ipv4/syncookies.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 729ceb5f63c6..8113c30ccf96 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c @@ -326,7 +326,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb) goto out; ret = NULL; - req = inet_reqsk_alloc(&tcp_request_sock_ops, sk); /* for safety */ + req = inet_reqsk_alloc(&tcp_request_sock_ops, sk, false); /* for safety */ if (!req) goto out; |