[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220124170555.1054480-1-ardb@kernel.org>
Date: Mon, 24 Jan 2022 18:05:55 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Ard Biesheuvel <ardb@...nel.org>
Subject: [PATCH] mm: make 'highmem' symbol ro_after_init
The 'highmem' variable is only set at boot, so we can make it
ro_after_init and prevent it from being corrupted inadvertently, or from
ending up in a contended cacheline.
Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
---
mm/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory.c b/mm/memory.c
index c125c4969913..50e82cb94ccc 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -106,7 +106,7 @@ EXPORT_SYMBOL(mem_map);
* highstart_pfn must be the same; there must be no gap between ZONE_NORMAL
* and ZONE_HIGHMEM.
*/
-void *high_memory;
+void *high_memory __ro_after_init;
EXPORT_SYMBOL(high_memory);
/*
--
2.30.2
Powered by blists - more mailing lists