From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381013; b=isTIuKofKBDoDVN1j5eMGpVrkGLFCaO4Sh4AQVrUtRzSwfzzFv5E0CGaE8QLw3K0LVtX NHyEdYS1UMmeiHAX4TzkE9egX7Ls/A82E+2Ju7rvZyVkzyciirv4z5krx+NG09kk+IsqG LYJeol5ka2OASLE/PbbRG0GXuel5+7nmJOeO5O5QFvIt4hwt5WuTjPzS97sOHLFtymUT0 ofxwqWG0H3ykXoIPJCdb4Uhy7cfjsOQ/nnQW1txvO1UsMIA2nDubIejqmObNHl2iF19E6 VCNRHkd3+9/70FgemhA5CfbshFweGMo2Nvc+Dt3srhmr6XbdVP3CBnQGhEe9FOFi4FQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381013; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=JWRock6aPrRoECXuD3q13a9Bu4T+ShTDhNXNpf3zCBM=; b=sJpTvwGjaSVPMFvFTamFki+B3an0ePJKcggtprsJn7dl7bmBm+wLqAEDuLLGH/agwfMf keekuJTJYW3FO8f+MMKdrmPqw5u3E1NiwLIBZ8wwgXD3w9c3wezTookD4mrQzlC5Z07Gp qApeXMZgpJubBaO0DTs5fZIXvYwlevg3yna8Hq8/MQX1xGuYxSH1lcz23x2pkXi6AXVy7 q+CmlJKNQxw0FrhI3gU0Q0kOwljvKnVPPhjVuYBwFGSck+TyjOzNUsMP6q2wye7r2KR/A kvir4OOuZ498Yp2TBma052yBRVSIIKxWfpbV0B22YXoCCxDtRRK2PRhOawLKwYnEThA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=XYEydMWR; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48FD6606A32F; Fri, 4 Dec 2026 10:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=XYEydMWR Received: by smtp.kernel.org (Postfix) with ESMTPSA id B416A1F0092C; Fri, 4 Dec 2026 10:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796381013; bh=JWRock6aPrRoECXuD3q13a9Bu4T+ShTDhNXNpf3zCBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XYEydMWRGoQyUCWcCaKcAH+6bmLJuzfCj6eNgs72/hTHpgF7bE2SdqOlGRXB29zbG w5hiIgeEy9L6nej3er1vm//2ptF0tN/lDlz13uvFihWsEknLjUggp3JASrYUdQ3Mnj K5s7rWV/hyIKQjcVDmTmKbCqhZHQMKvbQkQLBbOE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nathan Chancellor , "Matthieu Baerts (NGI0)" , Jakub Kicinski Subject: [PATCH 7.3 519/742] mptcp: Avoid unsequenced accesses to jiffies in mptcp_reset_tout_timer() Date: Fri, 4 Dec 2026 19:06:23 +0900 Message-ID: <20261204100648.950767316@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nathan Chancellor commit 728a2abd15a767f662a44030931ea7b2959b4e88 upstream. 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 Reviewed-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20261114-mptcp-wunsequenced-v1-1-707a73a6c172@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/mptcp/protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -3042,7 +3042,8 @@ void mptcp_reset_tout_timer(struct mptcp return; close_timeout = (unsigned long)inet_csk(sk)->icsk_mtup.probe_timestamp - - tcp_jiffies32 + jiffies + mptcp_close_timeout(sk); + tcp_jiffies32; + close_timeout += jiffies + mptcp_close_timeout(sk); /* the close timeout takes precedence on the fail one, and here at least one of * them is active