]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - init/do_mounts.c
x86/speculation/mds: Add mitigation control for MDS
[mirror_ubuntu-bionic-kernel.git] / init / do_mounts.c
index 7cf4f6dafd5f32031db0a1d28072fc93c0474f5a..148721386084a509f64826a822b6015a1c71a73e 100644 (file)
@@ -548,6 +548,7 @@ void __init mount_root(void)
 void __init prepare_namespace(void)
 {
        int is_floppy;
+       int err;
 
        if (root_delay) {
                printk(KERN_INFO "Waiting %d sec before mounting root device...\n",
@@ -601,6 +602,13 @@ out:
        devtmpfs_mount("dev");
        sys_mount(".", "/", NULL, MS_MOVE, NULL);
        sys_chroot(".");
+#ifdef CONFIG_BLOCK
+       /* recreate the /dev/root */
+       err = create_dev("/dev/root", ROOT_DEV);
+
+       if (err < 0)
+               pr_emerg("Failed to create /dev/root: %d\n", err);
+#endif
 }
 
 static bool is_tmpfs;