Skip to content

Commit

Permalink
evm: mark evm_fixmode as __ro_after_init
Browse files Browse the repository at this point in the history
commit 32ba540 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>
  • Loading branch information
Austin Kim authored and gregkh committed Nov 18, 2021
1 parent eab090d commit c7400e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/integrity/evm/evm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c7400e2

Please sign in to comment.