summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorDaiane Angolini <daiane.angolini@foundries.io>2022-07-13 16:07:00 -0300
committerDaiane Angolini <daiane.angolini@foundries.io>2022-07-13 16:07:00 -0300
commit89010c75012de410df503d16a134c7588151d667 (patch)
treeb116fd7f31dfef0016815f96106626a8d588e8b9 /mm
parenta6fa166f579bdaafb8bfae437bc3ad6704804f55 (diff)
parent3fbf24b73f4a5bc8fd39a6b7a29145451c1039ce (diff)
Merge tag 'v5.15.38' into 5.15.32-2.0.0
This is the 5.15.38 stable release
Diffstat (limited to 'mm')
-rw-r--r--mm/kasan/quarantine.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
index 47ed4fc33a29..1bd6a3f13467 100644
--- a/mm/kasan/quarantine.c
+++ b/mm/kasan/quarantine.c
@@ -315,6 +315,13 @@ static void per_cpu_remove_cache(void *arg)
struct qlist_head *q;
q = this_cpu_ptr(&cpu_quarantine);
+ /*
+ * Ensure the ordering between the writing to q->offline and
+ * per_cpu_remove_cache. Prevent cpu_quarantine from being corrupted
+ * by interrupt.
+ */
+ if (READ_ONCE(q->offline))
+ return;
qlist_move_cache(q, &to_free, cache);
qlist_free_all(&to_free, cache);
}