Commit 7b9de406 authored by Nayna Jain's avatar Nayna Jain Committed by Jarkko Sakkinen

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: default avatarNayna Jain <nayna@linux.ibm.com>
Reviewed-and-tested-by: default avatarMimi Zohar <zohar@linux.ibm.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Tested-by: default avatarNageswara R Sastry <rnsastry@linux.ibm.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
parent bc026676
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment