summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLen Bao <len.bao@gmx.us>2026-05-16 18:22:47 +0300
committerJarkko Sakkinen <jarkko@kernel.org>2026-06-15 15:19:12 +0300
commitcc99abbe2aa7aed48fc7d8d21514240e063ea732 (patch)
tree517035f40a75cbc89010973331843fa01bec8fff
parent8f2e22cfc45903b28bb9c5829a9ddbccc5001ea3 (diff)
downloadlinux-cc99abbe2aa7aed48fc7d8d21514240e063ea732.tar.xz
keys/trusted_keys: mark 'migratable' as __ro_after_init
The 'migratable' variable is initialized only during the init phase in the 'init_trusted' function and never changed. So, mark it as __ro_after_init. Signed-off-by: Len Bao <len.bao@gmx.us> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Link: https://lore.kernel.org/r/20260516152249.41851-1-len.bao@gmx.us Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
-rw-r--r--security/keys/trusted-keys/trusted_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/keys/trusted-keys/trusted_core.c b/security/keys/trusted-keys/trusted_core.c
index 6aed17bee09d..0509d9955f2a 100644
--- a/security/keys/trusted-keys/trusted_core.c
+++ b/security/keys/trusted-keys/trusted_core.c
@@ -65,7 +65,7 @@ DEFINE_STATIC_CALL_NULL(trusted_key_unseal,
DEFINE_STATIC_CALL_NULL(trusted_key_get_random,
*trusted_key_sources[0].ops->get_random);
static void (*trusted_key_exit)(void);
-static unsigned char migratable;
+static unsigned char migratable __ro_after_init;
enum {
Opt_err,