Commit 3f8b2667 authored by Paolo Abeni's avatar Paolo Abeni Committed by Jakub Kicinski
Browse files

mptcp: properly annotate nested lock



MPTCP closes the subflows while holding the msk-level lock.
While acquiring the subflow socket lock we need to use the
correct nested annotation, or we can hit a lockdep splat
at runtime.

Reported-and-tested-by: default avatarGeliang Tang <geliangtang@gmail.com>
Fixes: e16163b6 ("mptcp: refactor shutdown and close")
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Reviewed-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0c148460
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2119,7 +2119,7 @@ void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,

	list_del(&subflow->node);

	lock_sock(ssk);
	lock_sock_nested(ssk, SINGLE_DEPTH_NESTING);

	/* if we are invoked by the msk cleanup code, the subflow is
	 * already orphaned