All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [MPTCP][PATCH mptcp-next] Squash to "mptcp: implement delegated actions"
@ 2021-01-19  1:26 Geliang Tang
  0 siblings, 0 replies; only message in thread
From: Geliang Tang @ 2021-01-19  1:26 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

Since a new listening socket in kernel for the new port is added, there's
a lockdep warning in mptcp_subflow_process_delegated. This patch added the
_nested annotation for the sock lock to fix it.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/138
Suggested-by: Paolo Abeni <pabeni(a)redhat.com>
Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
---
 net/mptcp/protocol.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 442ad81d4abc..c750767be898 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2978,13 +2978,14 @@ void mptcp_subflow_process_delegated(struct sock *ssk)
 {
 	struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk);
 	struct sock *sk = subflow->conn;
+	unsigned long flags;
 
-	mptcp_data_lock(sk);
+	spin_lock_irqsave_nested(&sk->sk_lock.slock, flags, SINGLE_DEPTH_NESTING);
 	if (!sock_owned_by_user(sk))
 		__mptcp_subflow_push_pending(sk, ssk);
 	else
 		set_bit(MPTCP_PUSH_PENDING, &mptcp_sk(sk)->flags);
-	mptcp_data_unlock(sk);
+	spin_unlock_irqrestore(&sk->sk_lock.slock, flags);
 	mptcp_subflow_delegated_done(subflow);
 }
 
-- 
2.29.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-19  1:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19  1:26 [MPTCP] [MPTCP][PATCH mptcp-next] Squash to "mptcp: implement delegated actions" Geliang Tang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.