Change-Id: I4dd187ff10b712159d36b004ff899a0db9ba0155
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4153
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Reviewed-by: Bo Gan <ganb@vmware.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,42 @@ |
| 0 |
+From fe52a1d246edc822e796d9c7890551e6a4049a27 Mon Sep 17 00:00:00 2001 |
|
| 1 |
+From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> |
|
| 2 |
+Date: Fri, 20 Nov 2015 14:01:26 -0600 |
|
| 3 |
+Subject: [PATCH 102/127] init: do_mounts: recreate /dev/root |
|
| 4 |
+ |
|
| 5 |
+Rootfs shows as is mounted in /dev/root, but this devices is not present in |
|
| 6 |
+/dev directory. |
|
| 7 |
+ |
|
| 8 |
+Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> |
|
| 9 |
+--- |
|
| 10 |
+ init/do_mounts.c | 8 ++++++++ |
|
| 11 |
+ 1 file changed, 8 insertions(+) |
|
| 12 |
+ |
|
| 13 |
+diff --git a/init/do_mounts.c b/init/do_mounts.c |
|
| 14 |
+index c2de5104aad2..c6db994a7213 100644 |
|
| 15 |
+--- a/init/do_mounts.c |
|
| 16 |
+@@ -549,6 +549,7 @@ void __init mount_root(void) |
|
| 17 |
+ void __init prepare_namespace(void) |
|
| 18 |
+ {
|
|
| 19 |
+ int is_floppy; |
|
| 20 |
++ int err; |
|
| 21 |
+ |
|
| 22 |
+ if (root_delay) {
|
|
| 23 |
+ printk(KERN_INFO "Waiting %d sec before mounting root device...\n", |
|
| 24 |
+@@ -602,6 +603,13 @@ void __init prepare_namespace(void) |
|
| 25 |
+ devtmpfs_mount("dev");
|
|
| 26 |
+ sys_mount(".", "/", NULL, MS_MOVE, NULL);
|
|
| 27 |
+ sys_chroot(".");
|
|
| 28 |
++#ifdef CONFIG_BLOCK |
|
| 29 |
++ /* recreate the /dev/root */ |
|
| 30 |
++ err = create_dev("/dev/root", ROOT_DEV);
|
|
| 31 |
++ |
|
| 32 |
++ if (err < 0) |
|
| 33 |
++ pr_emerg("Failed to create /dev/root: %d\n", err);
|
|
| 34 |
++#endif |
|
| 35 |
+ } |
|
| 36 |
+ |
|
| 37 |
+ static bool is_tmpfs; |
|
| 38 |
+-- |
|
| 39 |
+2.14.1 |
|
| 40 |
+ |
| ... | ... |
@@ -2,7 +2,7 @@ |
| 2 | 2 |
Summary: Kernel |
| 3 | 3 |
Name: linux-esx |
| 4 | 4 |
Version: 4.4.92 |
| 5 |
-Release: 2%{?dist}
|
|
| 5 |
+Release: 3%{?dist}
|
|
| 6 | 6 |
License: GPLv2 |
| 7 | 7 |
URL: http://www.kernel.org/ |
| 8 | 8 |
Group: System Environment/Kernel |
| ... | ... |
@@ -38,6 +38,7 @@ Patch23: p9fs_dir_readdir-offset-support.patch |
| 38 | 38 |
Patch24: Implement-the-f-xattrat-family-of-functions.patch |
| 39 | 39 |
# Fix CVE-2017-11472 |
| 40 | 40 |
Patch25: ACPICA-Namespace-fix-operand-cache-leak.patch |
| 41 |
+Patch26: init-do_mounts-recreate-dev-root.patch |
|
| 41 | 42 |
|
| 42 | 43 |
BuildRequires: bc |
| 43 | 44 |
BuildRequires: kbd |
| ... | ... |
@@ -100,6 +101,7 @@ The Linux package contains the Linux kernel doc files |
| 100 | 100 |
%patch23 -p1 |
| 101 | 101 |
%patch24 -p1 |
| 102 | 102 |
%patch25 -p1 |
| 103 |
+%patch26 -p1 |
|
| 103 | 104 |
|
| 104 | 105 |
%build |
| 105 | 106 |
# patch vmw_balloon driver |
| ... | ... |
@@ -188,6 +190,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
|
| 188 | 188 |
/usr/src/linux-headers-%{uname_r}
|
| 189 | 189 |
|
| 190 | 190 |
%changelog |
| 191 |
+* Mon Oct 30 2017 Bo Gan <ganb@vmware.com> 4.4.92-3 |
|
| 192 |
+- Recreate /dev/root in init |
|
| 191 | 193 |
* Tue Oct 17 2017 Alexey Makhalov <amakhalov@vmware.com> 4.4.92-2 |
| 192 | 194 |
- Enable vsyscall emulation |
| 193 | 195 |
- Do not use deprecated -q depmod option |