diff options
author | Mark Brown <broonie@kernel.org> | 2024-02-19 16:58:41 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-02-19 16:58:41 +0000 |
commit | d68ce3aa8142333a96a071a9a0207f21c04e54cc (patch) | |
tree | 15754707ec571eb08c8d6308fe2459e46b8a5468 /net/ipv4/af_inet.c | |
parent | ec29a4d9b7c7329afc61e7932cb91e9b292b2b74 (diff) | |
parent | b401b621758e46812da61fa58a67c3fd8d91de0d (diff) |
regulator: Merge up v6.8-rc5
There are dependencies on the PWM fixes for some new work on the PWM
driver.
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 835f4f9d98d2..a5a820ee2026 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -330,6 +330,9 @@ lookup_protocol: if (INET_PROTOSW_REUSE & answer_flags) sk->sk_reuse = SK_CAN_REUSE; + if (INET_PROTOSW_ICSK & answer_flags) + inet_init_csk_locks(sk); + inet = inet_sk(sk); inet_assign_bit(IS_ICSK, sk, INET_PROTOSW_ICSK & answer_flags); @@ -1625,10 +1628,12 @@ EXPORT_SYMBOL(inet_current_timestamp); int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) { - if (sk->sk_family == AF_INET) + unsigned int family = READ_ONCE(sk->sk_family); + + if (family == AF_INET) return ip_recv_error(sk, msg, len, addr_len); #if IS_ENABLED(CONFIG_IPV6) - if (sk->sk_family == AF_INET6) + if (family == AF_INET6) return pingv6_ops.ipv6_recv_error(sk, msg, len, addr_len); #endif return -EINVAL; |