[PATCH mptcp-next RFC 1/3] mptcp: no longer fully_established after a fallback
"Matthieu Baerts (NGI0)" <[email protected]>
| Newsgroups | dev.linux.lists.mptcp |
|---|---|
| Message-ID | <[email protected]> |
When a fallback is done, the MPTCP_FALLBACK_DONE bit is set, which is protected by the fallback lock. That's good, but while at it, the msk fully established state can also be reset, to easily prevent some operations. This is just an optimisation to bail early in some situations: with the PM, or when receiving an MP_JOIN. This is not a protection that requires locks to avoid races: the fallback lock and other variables are there for that. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> --- net/mptcp/protocol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index c2762d74f29d..a3982e4ed553 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -94,6 +94,7 @@ bool __mptcp_try_fallback(struct mptcp_sock *msk, int fb_mib) return false; } + WRITE_ONCE(msk->fully_established, false); msk->allow_subflows = false; set_bit(MPTCP_FALLBACK_DONE, &msk->flags); __MPTCP_INC_STATS(net, fb_mib); -- 2.53.0