]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - kernel/module.c
UBUNTU: Ubuntu-4.13.0-45.50
[mirror_ubuntu-artful-kernel.git] / kernel / module.c
index 40f983cbea81d1e3711955dfb2409659d89fd317..41b97a191a72ee495de444f04f69d3582ef2a5f7 100644 (file)
@@ -2781,7 +2781,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 && !sig_enforce && !kernel_is_locked_down())
                err = 0;
 
        return err;
@@ -3495,6 +3495,11 @@ static noinline int do_init_module(struct module *mod)
         * walking this with preempt disabled.  In all the failure paths, we
         * call synchronize_sched(), but we don't want to slow down the success
         * path, so use actual RCU here.
+        * Note that module_alloc() on most architectures creates W+X page
+        * mappings which won't be cleaned up until do_free_init() runs.  Any
+        * code such as mark_rodata_ro() which depends on those mappings to
+        * be cleaned up needs to sync with the queued work - ie
+        * rcu_barrier_sched()
         */
        call_rcu_sched(&freeinit->rcu, do_free_init);
        mutex_unlock(&module_mutex);