diff options
| author | Nathan Chancellor <nathan@kernel.org> | 2026-11-14 21:30:07 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-17 17:36:56 -0800 |
| commit | 728a2abd15a767f662a44030931ea7b2959b4e88 (patch) | |
| tree | 2f56ea67f5764754828f4903c833dc77e47c27b4 /tools/perf/scripts/python/bin | |
| parent | c5e5ac57b559962498886435394b9cbcef20d553 (diff) | |
mptcp: Avoid unsequenced accesses to jiffies in mptcp_reset_tout_timer()
After a recent improvement in clang to warn on unsequenced accesses to
volatile variables [1], an instance appears in mptcp_reset_tout_timer(),
which can break the build with CONFIG_WERROR=y / W=e:
net/mptcp/protocol.c:3044:20: error: unsequenced accesses to volatile qualified 'jiffies' [-Werror,-Wunsequenced]
3044 | tcp_jiffies32 + jiffies + mptcp_close_timeout(sk);
| ~~~~~~~~~~~~~ ^
Per C11 5.1.2.3.2, accessing a volatile object is a side effect. Per C11
6.5.2, unsequenced side effects on the same scalar object are undefined
behavior. Per C11 6.5.3, unless otherwise specified, side effects and
value computations of subexpressions are unsequenced within expressions.
Add an explicit sequence point by splitting the addition expression in
half, eliminating the undefined behavior and clearing up the warning.
Cc: stable@vger.kernel.org
Fixes: 76a13b315709 ("mptcp: invoke MP_FAIL response when needed")
Closes: https://github.com/ClangBuiltLinux/linux/issues/2193
Link: https://github.com/llvm/llvm-project/commit/955715460eaf9188c241c74750637fc82dfcc423 [1]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20261114-mptcp-wunsequenced-v1-1-707a73a6c172@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
