diff options
author | Eric Dumazet <edumazet@google.com> | 2015-09-25 10:39:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-25 16:00:38 -0400 |
commit | 5d062de7f8ea1ca7c635957ff1144fba815ba34c (patch) | |
tree | 913926fe8c4d4d3594a4a8558aa3ac6feb80ded6 /include/net/tcp.h | |
parent | 6ac705b1805863b1899e85f641bb265f9e6e9d99 (diff) |
tcp: constify tcp_make_synack() socket argument
listener socket is not locked when tcp_make_synack() is called.
We better make sure no field is written.
There is one exception : Since SYNACK packets are attached to the listener
at this moment (or SYN_RECV child in case of Fast Open),
sock_wmalloc() needs to update sk->sk_wmem_alloc, but this is done using
atomic operations so this is safe.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 45bc3c63c3fd..19f23590baa0 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -461,7 +461,7 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
461 | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb); | 461 | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb); |
462 | int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); | 462 | int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); |
463 | int tcp_connect(struct sock *sk); | 463 | int tcp_connect(struct sock *sk); |
464 | struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, | 464 | struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst, |
465 | struct request_sock *req, | 465 | struct request_sock *req, |
466 | struct tcp_fastopen_cookie *foc); | 466 | struct tcp_fastopen_cookie *foc); |
467 | int tcp_disconnect(struct sock *sk, int flags); | 467 | int tcp_disconnect(struct sock *sk, int flags); |