smack: mark 'smack_enabled' global variable as __initdata
authorAustin Kim <austin.kim@lge.com>
Tue, 29 Jun 2021 13:41:44 +0000 (14:41 +0100)
committerCasey Schaufler <casey@schaufler-ca.com>
Tue, 20 Jul 2021 17:34:59 +0000 (10:34 -0700)
Mark 'smack_enabled' as __initdata
since it is only used during initialization code.

Signed-off-by: Austin Kim <austin.kim@lge.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
security/smack/smack.h
security/smack/smack_lsm.c

index c3cfbdf..99c3422 100644 (file)
@@ -302,7 +302,7 @@ int smack_populate_secattr(struct smack_known *skp);
 /*
  * Shared data.
  */
-extern int smack_enabled;
+extern int smack_enabled __initdata;
 extern int smack_cipso_direct;
 extern int smack_cipso_mapped;
 extern struct smack_known *smack_net_ambient;
index 223a6da..cacbe75 100644 (file)
@@ -54,7 +54,7 @@
 static DEFINE_MUTEX(smack_ipv6_lock);
 static LIST_HEAD(smk_ipv6_port_list);
 struct kmem_cache *smack_rule_cache;
-int smack_enabled;
+int smack_enabled __initdata;
 
 #define A(s) {"smack"#s, sizeof("smack"#s) - 1, Opt_##s}
 static struct {