diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 831a18dc7aa6d..fcb8f89924ea9 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -4593,6 +4593,8 @@ void tcp_done(struct sock *sk) */ req = rcu_dereference_protected(tcp_sk(sk)->fastopen_rsk, 1); + WARN_ON_ONCE(sk->sk_state == TCP_CLOSE); + if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) TCP_INC_STATS(sock_net(sk), TCP_MIB_ATTEMPTFAILS); diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 370c3836b7712..66eab2cdb702d 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -983,7 +983,8 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk, WRITE_ONCE(msk->pm.remote_deny_join_id0, true); if (unlikely(!READ_ONCE(msk->pm.server_side))) - pr_warn_once("bogus mpc option on established client sk"); + /* DO-NOT-MERGE: use WARN i/o pr_warn: only for MPTCP export */ + WARN_ONCE(1, "bogus mpc option on established client sk"); set_fully_established: mptcp_data_lock((struct sock *)msk);