]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mptcp: decrement subflows counter on failed passive join
authorChenguang Zhao <zhaochenguang@kylinos.cn>
Tue, 21 Jul 2026 22:14:38 +0000 (00:14 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 23 Jul 2026 17:50:38 +0000 (10:50 -0700)
commitf3ca0ee2cc308e33896536789cbc5f3a12ca7b30
tree6ed6a04506189cba88aff8d4f7850f89386a1c7d
parent234e5e898b713bc0b3a631b6f002897f43d046c8
mptcp: decrement subflows counter on failed passive join

mptcp_pm_allow_new_subflow() increments extra_subflows before
__mptcp_finish_join() on the passive MP_JOIN path.

In case of race conditions, the subflow is dropped without calling
mptcp_close_ssk(), so the counter is not rolled back.

Call mptcp_pm_close_subflow() when the join completion fails to
decrement the subflows counter.

Fixes: 10f6d46c943d ("mptcp: fix race between MP_JOIN and close")
Cc: stable@vger.kernel.org
Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260722-net-mptcp-misc-fixes-7-2-rc5-v1-1-6fb595bc86ef@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c