]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - init/main.c
Btrfs: fix duplicate extents after fsync of file with prealloc extents
[mirror_ubuntu-bionic-kernel.git] / init / main.c
index b8b121c17ff11869abed927b1965f0ff6621e7e6..44f88af9b191d5d3d3f285fbe1f2aae4699734e2 100644 (file)
@@ -980,6 +980,13 @@ __setup("rodata=", set_debug_rodata);
 static void mark_readonly(void)
 {
        if (rodata_enabled) {
+               /*
+                * load_module() results in W+X mappings, which are cleaned up
+                * with call_rcu_sched().  Let's make sure that queued work is
+                * flushed so that we don't hit false positives looking for
+                * insecure pages which are W+X.
+                */
+               rcu_barrier_sched();
                mark_rodata_ro();
                rodata_test();
        } else