[PATCH RFC 1/5] dump_stack: Make arch description buffer __ro_after_init
Nathan Lynch via B4 Relay
devnull+nathanl.linux.ibm.com at kernel.org
Fri Jan 19 02:25:12 AEDT 2024
From: Nathan Lynch <nathanl at linux.ibm.com>
The static hardware description buffer is populated by arch code
during boot and should not change afterwards, so mark it
__ro_after_init.
Signed-off-by: Nathan Lynch <nathanl at linux.ibm.com>
---
lib/dump_stack.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/dump_stack.c b/lib/dump_stack.c
index 83471e81501a..1057f102f6f2 100644
--- a/lib/dump_stack.c
+++ b/lib/dump_stack.c
@@ -6,6 +6,7 @@
#include <linux/kernel.h>
#include <linux/buildid.h>
+#include <linux/cache.h>
#include <linux/export.h>
#include <linux/sched.h>
#include <linux/sched/debug.h>
@@ -15,7 +16,7 @@
#include <linux/utsname.h>
#include <linux/stop_machine.h>
-static char dump_stack_arch_desc_str[128];
+static char dump_stack_arch_desc_str[128] __ro_after_init;
/**
* dump_stack_set_arch_desc - set arch-specific str to show with task dumps
--
2.43.0
More information about the Linuxppc-dev
mailing list