module: Do not access sig_enforce directly
authorJia Zhang <zhang.jia@linux.alibaba.com>
Wed, 11 Apr 2018 03:53:33 +0000 (11:53 +0800)
committerJessica Yu <jeyu@kernel.org>
Mon, 16 Apr 2018 21:46:03 +0000 (23:46 +0200)
Call is_module_sig_enforced() instead.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
kernel/module.c

index a6e43a5..f695474 100644 (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;