diff options
author | Nayna Jain <nayna@linux.ibm.com> | 2023-08-15 07:27:19 -0400 |
---|---|---|
committer | Jarkko Sakkinen <jarkko@kernel.org> | 2023-08-17 20:12:35 +0000 |
commit | 7b9de406582d12b72cce72c056b5678e8c0627eb (patch) | |
tree | a5c5d6f8e0cfdf604b4a67499000befe4ae3ce11 /security/integrity | |
parent | bc02667698b0e828f566e031d5020298b8d0c5de (diff) |
integrity: remove global variable from machine_keyring.c
trust_mok variable is accessed within a single function locally.
Change trust_mok from global to local static variable.
Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Reviewed-and-tested-by: Mimi Zohar <zohar@linux.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Tested-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'security/integrity')
-rw-r--r-- | security/integrity/platform_certs/machine_keyring.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c index 389a6e7c9245..9482e16cb2ca 100644 --- a/security/integrity/platform_certs/machine_keyring.c +++ b/security/integrity/platform_certs/machine_keyring.c @@ -8,8 +8,6 @@ #include <linux/efi.h> #include "../integrity.h" -static bool trust_mok; - static __init int machine_keyring_init(void) { int rc; @@ -65,9 +63,11 @@ static __init bool uefi_check_trust_mok_keys(void) bool __init trust_moklist(void) { static bool initialized; + static bool trust_mok; if (!initialized) { initialized = true; + trust_mok = false; if (uefi_check_trust_mok_keys()) trust_mok = true; |