The subflow->fully_established flag is always written under the subflow socket lock. Reading such value under the same lock does not require any ONCE annotation.
Unified · Split
| @@ -530,7 +530,7 @@ static bool mptcp_established_options_mp(struct sock *sk, struct sk_buff *skb, · 529 unmodified lines | |||
| 530 | return false; | 530 | return false; |
| 531 | 531 | ||
| 532 | /* MPC/MPJ needed only on 3rd ack packet, DATA_FIN and TCP shutdown take precedence */ | 532 | /* MPC/MPJ needed only on 3rd ack packet, DATA_FIN and TCP shutdown take precedence */ |
| 533 | if (READ_ONCE(subflow->fully_established) || snd_data_fin_enable || | 533 | if (subflow->fully_established || snd_data_fin_enable || |
| 534 | subflow->snd_isn != TCP_SKB_CB(skb)->seq || | 534 | subflow->snd_isn != TCP_SKB_CB(skb)->seq || |
| 535 | sk->sk_state != TCP_ESTABLISHED) | 535 | sk->sk_state != TCP_ESTABLISHED) |
| 536 | return false; | 536 | return false; |
| @@ -981,7 +981,7 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk, · 444 unmodified lines | |||
| 981 | /* here we can process OoO, in-window pkts, only in-sequence 4th ack | 981 | /* here we can process OoO, in-window pkts, only in-sequence 4th ack |
| 982 | * will make the subflow fully established | 982 | * will make the subflow fully established |
| 983 | */ | 983 | */ |
| 984 | if (likely(READ_ONCE(subflow->fully_established))) { | 984 | if (likely(subflow->fully_established)) { |
| 985 | /* on passive sockets, check for 3rd ack retransmission | 985 | /* on passive sockets, check for 3rd ack retransmission |
| 986 | * note that msk is always set by subflow_syn_recv_sock() | 986 | * note that msk is always set by subflow_syn_recv_sock() |
| 987 | * for mp_join subflows | 987 | * for mp_join subflows |
| @@ -3886,7 +3886,7 @@ static void schedule_3rdack_retransmission(struct sock *ssk) · 3885 unmodified lines | |||
| 3886 | struct tcp_sock *tp = tcp_sk(ssk); | 3886 | struct tcp_sock *tp = tcp_sk(ssk); |
| 3887 | unsigned long timeout; | 3887 | unsigned long timeout; |
| 3888 | 3888 | ||
| 3889 | if (READ_ONCE(mptcp_subflow_ctx(ssk)->fully_established)) | 3889 | if (mptcp_subflow_ctx(ssk)->fully_established) |
| 3890 | return; | 3890 | return; |
| 3891 | 3891 | ||
| 3892 | /* reschedule with a timeout above RTT, as we must look only for drop */ | 3892 | /* reschedule with a timeout above RTT, as we must look only for drop */ |