mm-memcontrol-fix-data-race-on-reading-jiffies_64.patch removed from -mm tree
The quilt patch titled
Subject: mm/memcontrol: fix data-race on reading jiffies_64
has been removed from the -mm tree. Its filename was
mm-memcontrol-fix-data-race-on-reading-jiffies_64.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Jiayuan Chen <[email protected]>
Subject: mm/memcontrol: fix data-race on reading jiffies_64
Date: Thu, 27 Aug 2026 10:54:56 +0800
KCSAN reported a data-race between tick_do_update_jiffies64() updating jiffies_64 and mem_cgroup_flush_stats_ratelimited() reading it directly.
Unlike jiffies, jiffies_64 is not volatile, so raw reads are plain accesses and can even be torn on 32-bit. Use get_jiffies_64() instead, and fix the same pattern in mem_cgroup_flush_foreign().
---
mm/memcontrol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
mm/memcontrol.c renamed from mm/memcontrol.c~mm-memcontrol-fix-data-race-on-reading-jiffies_64 +3 -3
@@ -757,7 +757,7 @@ static void __mem_cgroup_flush_stats(strreturn ;if (mem_cgroup_is_root (memcg)) -WRITE_ONCE (flush_last_time, jiffies_64); +WRITE_ONCE (flush_last_time,get_jiffies_64 ());css_rstat_flush (&memcg->css); }
@@ -785,7 +785,7 @@ void mem_cgroup_flush_stats(struct mem_cvoid mem_cgroup_flush_stats_ratelimited (struct mem_cgroup *memcg) {/* Only flush if the periodic flusher is one full cycle late */ -if (time_after64 (jiffies_64,READ_ONCE (flush_last_time) +2 *FLUSH_TIME )) +if (time_after64 (get_jiffies_64 (),READ_ONCE (flush_last_time) +2 *FLUSH_TIME ))mem_cgroup_flush_stats (memcg); }
@@ -3946,7 +3946,7 @@ void mem_cgroup_flush_foreign(struct bdi {struct mem_cgroup *memcg =mem_cgroup_from_css (wb->memcg_css);unsigned long intv =msecs_to_jiffies (dirty_expire_interval *10 ); -u64 now = jiffies_64; +u64 now =get_jiffies_64 ();int i;for (i =0 ; i <MEMCG_CGWB_FRN_CNT ; i++) {
_
Patches currently in -mm which might be from [email protected] are