tcp: constify tcp_v{4|6}_send_synack() socket argument
authorEric Dumazet <edumazet@google.com>
Fri, 25 Sep 2015 14:39:21 +0000 (07:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Sep 2015 20:00:39 +0000 (13:00 -0700)
This documents fact that listener lock might not be held
at the time SYNACK are sent.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c

index 19f23590baa0c2e9f296e57393de1eba2f0beb40..868c535321695849464feaa82c176bcc274e9231 100644 (file)
@@ -1717,7 +1717,7 @@ struct tcp_request_sock_ops {
                                       const struct request_sock *req,
                                       bool *strict);
        __u32 (*init_seq)(const struct sk_buff *skb);
-       int (*send_synack)(struct sock *sk, struct dst_entry *dst,
+       int (*send_synack)(const struct sock *sk, struct dst_entry *dst,
                           struct flowi *fl, struct request_sock *req,
                           u16 queue_mapping, struct tcp_fastopen_cookie *foc);
        void (*queue_hash_add)(struct sock *sk, struct request_sock *req,
index 1c1009d783f502ae7fb111ff3cb6044e672de319..a23ba7daecbf3a43652eba9b080e0452cf8d09df 100644 (file)
@@ -818,7 +818,7 @@ static void tcp_v4_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
  *     This still operates on a request_sock only, not on a big
  *     socket.
  */
-static int tcp_v4_send_synack(struct sock *sk, struct dst_entry *dst,
+static int tcp_v4_send_synack(const struct sock *sk, struct dst_entry *dst,
                              struct flowi *fl,
                              struct request_sock *req,
                              u16 queue_mapping,
index 1071131a6c537a0a5eaf012019ffe07ca7af03bf..16fb299dcab87a605d4dfd80d7258c712fbffc3d 100644 (file)
@@ -434,7 +434,7 @@ out:
 }
 
 
-static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst,
+static int tcp_v6_send_synack(const struct sock *sk, struct dst_entry *dst,
                              struct flowi *fl,
                              struct request_sock *req,
                              u16 queue_mapping,