diff options
author | Eric Biggers <ebiggers@google.com> | 2018-10-03 17:15:44 -0700 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2018-10-10 12:56:15 -0400 |
commit | 2ab5daf867d1f7898327962d59d3039206294d3a (patch) | |
tree | 9e871519cecc565395135d459bf2b7fd0400eb33 /security | |
parent | b2724d5802a77b7fb47e84d9b88b80370eccbc64 (diff) | |
download | linux-stable-2ab5daf867d1f7898327962d59d3039206294d3a.tar.gz linux-stable-2ab5daf867d1f7898327962d59d3039206294d3a.tar.bz2 linux-stable-2ab5daf867d1f7898327962d59d3039206294d3a.zip |
security/integrity: remove unnecessary 'init_keyring' variable
The 'init_keyring' variable actually just gave the value of
CONFIG_INTEGRITY_TRUSTED_KEYRING. We should check the config option
directly instead. No change in behavior; this just simplifies the code.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/digsig.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c index 879396fa3be0..5eacba858e4b 100644 --- a/security/integrity/digsig.c +++ b/security/integrity/digsig.c @@ -37,12 +37,6 @@ static const char * const keyring_name[INTEGRITY_KEYRING_MAX] = { "_module", }; -#ifdef CONFIG_INTEGRITY_TRUSTED_KEYRING -static bool init_keyring __initdata = true; -#else -static bool init_keyring __initdata; -#endif - #ifdef CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY #define restrict_link_to_ima restrict_link_by_builtin_and_secondary_trusted #else @@ -85,7 +79,7 @@ int __init integrity_init_keyring(const unsigned int id) struct key_restriction *restriction; int err = 0; - if (!init_keyring) + if (!IS_ENABLED(CONFIG_INTEGRITY_TRUSTED_KEYRING)) return 0; restriction = kzalloc(sizeof(struct key_restriction), GFP_KERNEL); |