Skip to content

Commit 3cd4bb2

Browse files
Chenguang Zhaogregkh
authored andcommitted
mptcp: decrement subflows counter on failed passive join
commit f3ca0ee upstream. 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: 10f6d46 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 739a035 commit 3cd4bb2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/mptcp/protocol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3825,6 +3825,7 @@ bool mptcp_finish_join(struct sock *ssk)
38253825
mptcp_data_unlock(parent);
38263826

38273827
if (!ret) {
3828+
mptcp_pm_close_subflow(msk);
38283829
err_prohibited:
38293830
subflow->reset_reason = MPTCP_RST_EPROHIBIT;
38303831
return false;

0 commit comments

Comments
 (0)