]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mptcp: pm: avoid calling PM specific code from core
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Fri, 7 Mar 2025 11:21:53 +0000 (12:21 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 10 Mar 2025 20:35:49 +0000 (13:35 -0700)
commita17336b2b2e0339b8107b9d4d0fd6b7cf51172e4
tree7305ed5d0410563ac4b70cb8d49fff9a65a68c07
parent40aa7409d30df2b610f8e590cbb183faa2ac6f1f
mptcp: pm: avoid calling PM specific code from core

When destroying an MPTCP socket, some userspace PM specific code was
called from mptcp_destroy_common() in protocol.c. That feels wrong, and
it is the only case.

Instead, the core now calls mptcp_pm_destroy() from pm.c which is now in
charge of cleaning the announced addresses list, and ask the different
PMs to do extra cleaning if needed, e.g. the userspace PM, if used, will
clean the local addresses list.

While at it, the userspace PM specific helper has been prefixed with
'mptcp_userspace_pm_' like the other ones.

No behavioural changes intended.

Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250307-net-next-mptcp-pm-reorg-v1-9-abef20ada03b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm.c
net/mptcp/pm_userspace.c
net/mptcp/protocol.c
net/mptcp/protocol.h