Message ID | 20230227-upstream-net-20230227-mptcp-fixes-v2-1-47c2e95eada9@tessares.net (mailing list archive) |
---|---|
State | Accepted |
Commit | b7a679ba7c652587b85294f4953f33ac0b756d40 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mptcp: fixes for 6.3 | expand |
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 4ae1a7304cf0..5070dc33675d 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -1432,6 +1432,13 @@ static void subflow_error_report(struct sock *ssk) { struct sock *sk = mptcp_subflow_ctx(ssk)->conn; + /* bail early if this is a no-op, so that we avoid introducing a + * problematic lockdep dependency between TCP accept queue lock + * and msk socket spinlock + */ + if (!sk->sk_socket) + return; + mptcp_data_lock(sk); if (!sock_owned_by_user(sk)) __mptcp_error_report(sk);