diff options
author | Paolo Abeni <pabeni@redhat.com> | 2022-05-19 00:04:43 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-05-20 05:05:07 +0200 |
commit | 7b16871f9932d8a371488d2967b033387870a747 (patch) | |
tree | a73694f2b3e93e1ee118947a810145744f889a48 /net/mptcp/subflow.c | |
parent | tcp: improve PRR loss recovery (diff) | |
download | linux-7b16871f9932d8a371488d2967b033387870a747.tar.xz linux-7b16871f9932d8a371488d2967b033387870a747.zip |
mptcp: stop using the mptcp_has_another_subflow() helper
The mentioned helper requires the msk socket lock, and the
current callers don't own it nor can't acquire it, so the
access is racy.
All the current callers are really checking for infinite mapping
fallback, and the latter condition is explicitly tracked by
the relevant msk variable: we can safely remove the caller usage
- and the caller itself.
The issue is present since MP_FAIL implementation, but the
fix only applies since the infinite fallback support, ence the
somewhat unexpected fixes tag.
Fixes: 0530020a7c8f ("mptcp: track and update contiguous data status")
Acked-and-tested-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/subflow.c')
-rw-r--r-- | net/mptcp/subflow.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index aecd98ac5dfe..27273cf091db 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -1233,8 +1233,7 @@ fallback: if (!__mptcp_check_fallback(msk)) { /* RFC 8684 section 3.7. */ if (subflow->send_mp_fail) { - if (mptcp_has_another_subflow(ssk) || - !READ_ONCE(msk->allow_infinite_fallback)) { + if (!READ_ONCE(msk->allow_infinite_fallback)) { ssk->sk_err = EBADMSG; tcp_set_state(ssk, TCP_CLOSE); subflow->reset_transient = 0; |