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=1796383882; b=QscardUrwCdRYQB5m+Vgww/j4+KGtPq3tqCS+B4OyjhT7LxNq7jQ+doQuFylaQEr4oJK ZcJjR8uSOZAFD2Y/RwNEO1nlklD/di1Ba22QZBWRzeH5xGHZgcNJGc/dhfF1Fvyx6La2G DJIa5l92ptk/plL0VFzaMBAqzkssIPO2WxQn2sFmgvOLYk5cjOJQyjFhhpcovCjBdo9TE WWN8VdWI6SX33joAAFCGWHVnDlRVciSiA/Q/QOUu/EWPRSJK/V2GMddrZvctWpyxrK0f7 Y72GrvYxkHAi7UkrzOsyeSYLBWJjroidofWFhDQWKGYC4c8KCxvR+wrRrSUs9TPL/ow== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383882; 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=ltv0jvJ9V9nWdBBTndloTwoVkt4vyY6CJaKkgooNulk=; b=o686OCqCGqmbMmLIz9cFNwk2T42SUURNCyXcL9geyNwFO1VZbjZ8pONBc6/Zk6GZKYfQ 9Xre4V3tCJdk7POxi3OL5RbnBleaEc5AAm68HYrq2V90ucDTBJTFzNpCXsUWJuCYDw+MT X21mLWUuytQBgGjmCpMokxD38YqDDQMSpI0+L6YeG6AJ0GEjF5czM4KJb0MiLvbNbG6qI pD5LU6j0bgSTcS9artR5MLS2aVS2txQLfS/Md9JSPgZHz6w5/ppYTk+ZTd9EjKiiAqK3s iaovyI9dqJ2ojWSFdzkBP7mfmxUQsIrPzHfdDB8MCioc1k3m/OeE0rb2MUjJf7mBKbg== 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=ZTvbayIT; 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 83D22606A322; Fri, 4 Dec 2026 11:31:22 +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=ZTvbayIT Received: by smtp.kernel.org (Postfix) with ESMTPSA id 024F51F000C2; Fri, 4 Dec 2026 11:31:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383882; bh=ltv0jvJ9V9nWdBBTndloTwoVkt4vyY6CJaKkgooNulk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZTvbayITwUY8BMd4a4Fu9wn7YYzg7tzdk+WMucLK+dGqAV5inxsPXif6z6+GqPfdb VyrUFrZsN8PJJD8FL6DLiaCXbRf9athGcY/zO8P3tly2a8sQbxFuCgdvfNC7jkuQ62 HbhKOTDy8zzKuFZyQ2JfSMLM0FVd8Ilw3ZtpxyYQ= 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 6.12 407/555] mptcp: Avoid unsequenced accesses to jiffies in mptcp_reset_tout_timer() Date: Fri, 4 Dec 2026 19:07:30 +0900 Message-ID: <20261204100625.237728322@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@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 6.12-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 @@ -2865,7 +2865,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