multipath-tcp / mptcp_net-next

Development version of the Upstream MultiPath TCP Linux kernel 🐧
https://mptcp.dev
Other
290 stars 41 forks source link

Annotate data-races around `subflow->fully_established` #516

Closed matttbe closed 2 months ago

matttbe commented 2 months ago

This has been covered for the msk->fully_established field,, but it looks like it is not the case for the subflow one:

msk:

net/mptcp/pm_netlink.c:                if (!READ_ONCE(msk->fully_established) ||
net/mptcp/protocol.c:        WRITE_ONCE(msk->fully_established, false);
net/mptcp/protocol.c:        WRITE_ONCE(msk->fully_established, false);
net/mptcp/protocol.h:        bool                fully_established;
net/mptcp/protocol.h:               READ_ONCE(mptcp_sk(sk)->fully_established);
net/mptcp/subflow.c:        WRITE_ONCE(msk->fully_established, true);

subflow:

net/mptcp/diag.c:        if (sf->fully_established)
net/mptcp/options.c:        if (subflow->fully_established || snd_data_fin_enable ||
net/mptcp/options.c:        if (likely(subflow->fully_established)) {
net/mptcp/protocol.c:        if (mptcp_subflow_ctx(ssk)->fully_established)
net/mptcp/protocol.h:                fully_established : 1,            /* path validated */
net/mptcp/protocol.h:        if (subflow->request_join && !subflow->fully_established)
net/mptcp/subflow.c:        subflow->fully_established = 1;
net/mptcp/subflow.c:                return !subflow->fully_established;
net/mptcp/subflow.c:                new_ctx->fully_established = 1;