From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02F2C308F3E for ; Mon, 4 May 2026 08:32:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777883551; cv=none; b=n44XUtQMysB3+67VCFA8C+SowFevY86OtMqcZ21Pv0609EJKR1bYKJbvFQXdF8cdB6BIA1nNrKCz3cja5/pJueU8ur7JjiU1zjeCkw89K4A6KJoL+w5bBwxZ4LSx0DakDcCYfoN+0DgElJmQIL8sKJ+XRktWOFIUXbXSqpyJ5PY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777883551; c=relaxed/simple; bh=/GBb3Do2prqtJ8yAQ3aRSjVTVNw53qCWCOYJSqjKVww=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=Wv31VG6doRwuOqas6OwDrjSChIUJtjcHvsqnMyAfPmi3bwywHlr6AjSHMuaQ3wLJzy5XD9eC2uLN3wWMxZIZJlFIFlO/dWiVyDtvvTIAfdtLnwlmZ6HeWRUSb7w4bC+14520I4oxlI9uUBxrIRL/XpkYNFmdZMKm1SHOMXYqd4Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Waf6SC+x; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Waf6SC+x" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54E40C2BCB8; Mon, 4 May 2026 08:32:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777883550; bh=/GBb3Do2prqtJ8yAQ3aRSjVTVNw53qCWCOYJSqjKVww=; h=Subject:To:Cc:From:Date:From; b=Waf6SC+x/mCyveN6NM1L7ML3TKLmsxZ5o9CVP51xGqnsgidAf7X+/whwElJNiuY0d 0/0d2Ct/HcQRrfrE9Mrmllmu+o9h/CGpbAfi+9Ko5pCbRWWYhcvv5DizLEwGOdlI/t C+bK3a/WlYHJd+LnQT+omY2Ou5H4oAuGFq0LgyiY= Subject: FAILED: patch "[PATCH] ARM: 9472/1: fix race condition on PG_dcache_clean in" failed to apply to 5.10-stable tree To: brian.ruley@gehealthcare.com,rmk+kernel@armlinux.org.uk,stable@vger.kernel.org,will@kernel.org Cc: From: Date: Mon, 04 May 2026 10:32:14 +0200 Message-ID: <2026050414-skinning-footprint-8ed2@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 75f9a484e817adea211c73f89ed938a2b2f90953 # git commit -s git send-email --to '' --in-reply-to '2026050414-skinning-footprint-8ed2@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 75f9a484e817adea211c73f89ed938a2b2f90953 Mon Sep 17 00:00:00 2001 From: Brian Ruley Date: Wed, 15 Apr 2026 18:12:48 +0100 Subject: [PATCH] ARM: 9472/1: fix race condition on PG_dcache_clean in __sync_icache_dcache() This bug was already discovered and fixed for arm64 in commit 588a513d3425 ("arm64: Fix race condition on PG_dcache_clean in __sync_icache_dcache()"). Verified with added instrumentation to track dcache flushes in a ring buffer, as shown by the (distilled) output: kernel: SIGILL at b6b80ac0 cpu 1 pid 32663 linux_pte=8eff659f hw_pte=8eff6e7e young=1 exec=1 kernel: dcache flush START cpu0 pfn=8eff6 ts=48629557020154 kernel: dcache flush SKIPPED cpu1 pfn=8eff6 ts=48629557020154 kernel: dcache flush FINISH cpu0 pfn=8eff6 ts=48629557036154 audisp-syslog: comm="journalctl" exe="/usr/bin/journalctl" sig=4 [...] Discussions in the mailing list mentioned that arch/arm is also affected but the fix was never applied to it [1][2]. Apply the change now, since the race condition can cause sporadic SIGILL's and SEGV's especially while under high memory pressure. Link: https://lore.kernel.org/all/adzMOdySgMIePcue@willie-the-truck [1] Link: https://lore.kernel.org/all/20210514095001.13236-1-catalin.marinas@arm.com [2] Signed-off-by: Brian Ruley Reviewed-by: Will Deacon Cc: Fixes: 6012191aa9c6 ("ARM: 6380/1: Introduce __sync_icache_dcache() for VIPT caches") Signed-off-by: Will Deacon Signed-off-by: Russell King (Oracle) diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 19470d938b23..4d7ef5cc36b6 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -304,8 +304,10 @@ void __sync_icache_dcache(pte_t pteval) else mapping = NULL; - if (!test_and_set_bit(PG_dcache_clean, &folio->flags.f)) + if (!test_bit(PG_dcache_clean, &folio->flags.f)) { __flush_dcache_folio(mapping, folio); + set_bit(PG_dcache_clean, &folio->flags.f); + } if (pte_exec(pteval)) __flush_icache_all();