diff options
author | David S. Miller <davem@davemloft.net> | 2023-03-18 12:23:48 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-03-18 12:23:48 +0000 |
commit | df28e8690e7126fa5c99e8863c27574204589f31 (patch) | |
tree | fd943e26281cfd7a7e0948d1949d6e0009c19510 /net/ipv4/tcp_minisocks.c | |
parent | 39a86d059a78bf29b66dd8bbeab04af1d55c02ba (diff) | |
parent | e9d9da91548b21e189fcd0259a0f2d26d1afc509 (diff) | |
download | linux-stable-df28e8690e7126fa5c99e8863c27574204589f31.tar.gz linux-stable-df28e8690e7126fa5c99e8863c27574204589f31.tar.bz2 linux-stable-df28e8690e7126fa5c99e8863c27574204589f31.zip |
Merge branch 'net-better-const'
Eric Dumazet says:
====================
net: better const qualifier awareness
This is a follow-up of d27d367d3b78 ("inet: better const qualifier awareness")
Adopting container_of_const() to perform (struct sock *)->(protocol sock *)
operation is allowing us to propagate const qualifier and thus detect
misuses at compile time.
Most conversions are trivial, because most protocols did not adopt yet
const sk pointers where it could make sense.
Only mptcp and tcp patches (end of this series) are requiring small
adjustments.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 9a7ef7732c24..dac0d62120e6 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -463,7 +463,7 @@ void tcp_ca_openreq_child(struct sock *sk, const struct dst_entry *dst) } EXPORT_SYMBOL_GPL(tcp_ca_openreq_child); -static void smc_check_reset_syn_req(struct tcp_sock *oldtp, +static void smc_check_reset_syn_req(const struct tcp_sock *oldtp, struct request_sock *req, struct tcp_sock *newtp) { @@ -492,7 +492,8 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, const struct inet_request_sock *ireq = inet_rsk(req); struct tcp_request_sock *treq = tcp_rsk(req); struct inet_connection_sock *newicsk; - struct tcp_sock *oldtp, *newtp; + const struct tcp_sock *oldtp; + struct tcp_sock *newtp; u32 seq; if (!newsk) |