Browse Source

module: Do not access sig_enforce directly

Call is_module_sig_enforced() instead.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
Jia Zhang 7 years ago
parent
commit
2c8fd268f4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      kernel/module.c

+ 1 - 1
kernel/module.c

@@ -2785,7 +2785,7 @@ static int module_sig_check(struct load_info *info, int flags)
 	}
 
 	/* Not having a signature is only an error if we're strict. */
-	if (err == -ENOKEY && !sig_enforce)
+	if (err == -ENOKEY && !is_module_sig_enforced())
 		err = 0;
 
 	return err;