diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 53e15514d90d..6c732b613dfd 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -312,7 +312,7 @@ static void tcp_v6_mtu_reduced(struct sock *sk)  	if ((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE))  		return; -	dst = inet6_csk_update_pmtu(sk, tcp_sk(sk)->mtu_info); +	dst = inet6_csk_update_pmtu(sk, READ_ONCE(tcp_sk(sk)->mtu_info));  	if (!dst)  		return; @@ -401,7 +401,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,  		if (!ip6_sk_accept_pmtu(sk))  			goto out; -		tp->mtu_info = ntohl(info); +		WRITE_ONCE(tp->mtu_info, ntohl(info));  		if (!sock_owned_by_user(sk))  			tcp_v6_mtu_reduced(sk);  		else if (!test_and_set_bit(TCP_MTU_REDUCED_DEFERRED, | 
