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>
This commit is contained in:
Jia Zhang 2018-04-11 11:53:33 +08:00 committed by Jessica Yu
parent 60cc43fc88
commit 2c8fd268f4

View File

@ -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;