summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorAustin Kim <austin.kim@lge.com>2021-10-28 12:26:42 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-18 14:03:46 +0100
commitc7400e2ec8de2cf0f8a858aeeaec2722106b2aab (patch)
tree774d716bd4bca686af20ce39662c1f1d8e1f07b1 /security
parenteab090dfcb1dbb5b8469343357ad037827345270 (diff)
downloadlinux-rt-c7400e2ec8de2cf0f8a858aeeaec2722106b2aab.tar.gz
evm: mark evm_fixmode as __ro_after_init
commit 32ba540f3c2a7ef61ed5a577ce25069a3d714fc9 upstream. The evm_fixmode is only configurable by command-line option and it is never modified outside initcalls, so declaring it with __ro_after_init is better. Signed-off-by: Austin Kim <austin.kim@lge.com> Cc: stable@vger.kernel.org Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/evm/evm_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
index f1ca3cac9b86..b929c683aba1 100644
--- a/security/integrity/evm/evm_main.c
+++ b/security/integrity/evm/evm_main.c
@@ -54,7 +54,7 @@ static struct xattr_list evm_config_default_xattrnames[] = {
LIST_HEAD(evm_config_xattrnames);
-static int evm_fixmode;
+static int evm_fixmode __ro_after_init;
static int __init evm_set_fixmode(char *str)
{
if (strncmp(str, "fix", 3) == 0)