[tip: locking/core] context_tracking: Make context_tracking_key __ro_after_init
From: tip-bot2 for Valentin Schneider
Date: Fri Mar 22 2024 - 06:58:40 EST
The following commit has been merged into the locking/core branch of tip:
Commit-ID: 4eab44a8ae98df53e59f6af3c860142177235507
Gitweb: https://git.kernel.org/tip/4eab44a8ae98df53e59f6af3c860142177235507
Author: Valentin Schneider <vschneid@xxxxxxxxxx>
AuthorDate: Wed, 13 Mar 2024 19:01:04 +01:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Fri, 22 Mar 2024 11:18:18 +01:00
context_tracking: Make context_tracking_key __ro_after_init
context_tracking_key is only ever enabled in __init ct_cpu_tracker_user(),
so mark it as __ro_after_init.
Signed-off-by: Valentin Schneider <vschneid@xxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20240313180106.2917308-3-vschneid@xxxxxxxxxx
---
kernel/context_tracking.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
index 70ae70d..24b1e11 100644
--- a/kernel/context_tracking.c
+++ b/kernel/context_tracking.c
@@ -432,7 +432,7 @@ static __always_inline void ct_kernel_enter(bool user, int offset) { }
#define CREATE_TRACE_POINTS
#include <trace/events/context_tracking.h>
-DEFINE_STATIC_KEY_FALSE(context_tracking_key);
+DEFINE_STATIC_KEY_FALSE_RO(context_tracking_key);
EXPORT_SYMBOL_GPL(context_tracking_key);
static noinstr bool context_tracking_recursion_enter(void)