mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
mptcp: decrement subflows counter on failed passive join
commitf3ca0ee2ccupstream. 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:10f6d46c94("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8e558bcaf1
commit
3cb65da64a
@@ -3786,6 +3786,7 @@ bool mptcp_finish_join(struct sock *ssk)
|
||||
mptcp_data_unlock(parent);
|
||||
|
||||
if (!ret) {
|
||||
mptcp_pm_close_subflow(msk);
|
||||
err_prohibited:
|
||||
subflow->reset_reason = MPTCP_RST_EPROHIBIT;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user