[kernel/f17] Remove /proc/device-tree when openfirmware init fails. (rhbz 818378)

Dave Jones davej at fedoraproject.org
Mon May 7 15:34:41 UTC 2012


commit ded40ae5b3213eb4fb6e4514966fdaa68a833e66
Author: Dave Jones <davej at redhat.com>
Date:   Mon May 7 11:34:29 2012 -0400

    Remove /proc/device-tree when openfirmware init fails. (rhbz 818378)

 fs-proc-devtree-remove_proc_entry.patch |   12 ++++++++++++
 kernel.spec                             |    7 +++++++
 2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/fs-proc-devtree-remove_proc_entry.patch b/fs-proc-devtree-remove_proc_entry.patch
new file mode 100644
index 0000000..c32e79e
--- /dev/null
+++ b/fs-proc-devtree-remove_proc_entry.patch
@@ -0,0 +1,12 @@
+diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
+index 927cbd1..f060f28 100644
+--- a/fs/proc/proc_devtree.c
++++ b/fs/proc/proc_devtree.c
+@@ -233,6 +233,7 @@ void __init proc_device_tree_init(void)
+ 		return;
+ 	root = of_find_node_by_path("/");
+ 	if (root == NULL) {
++		remove_proc_entry("device-tree", NULL);
+ 		pr_debug("/proc/device-tree: can't find root\n");
+ 		return;
+ 	}
diff --git a/kernel.spec b/kernel.spec
index 0064c02..485b64a 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -716,6 +716,8 @@ Patch4113: NFS-optimise-away-unnecessary-setattrs-for-open-O_TRUNC.patch
 Patch4114: NFSv4-fix-open-O_TRUNC-and-ftruncate-error-handling.patch
 
 # patches headed upstream
+Patch10000: fs-proc-devtree-remove_proc_entry.patch
+
 Patch12016: disable-i8042-check-on-apple-mac.patch
 
 Patch12303: dmar-disable-when-ricoh-multifunction.patch
@@ -1489,6 +1491,8 @@ ApplyPatch add-poll-requested-events.patch
 ApplyOptionalPatch drivers-media-update.patch
 
 # Patches headed upstream
+ApplyPatch fs-proc-devtree-remove_proc_entry.patch
+
 ApplyPatch disable-i8042-check-on-apple-mac.patch
 ApplyPatch linux-3.3-virtio-scsi.patch
 
@@ -2438,6 +2442,9 @@ fi
 #    '-'      |  |
 #              '-'
 %changelog
+* Mon May 07 2012 Dave Jones <davej at redhat.com>
+- Remove /proc/device-tree when openfirmware init fails. (rhbz 818378)
+
 * Fri May 04 2012 Justin M. Forbes <jforbes at redhat.com>
 - drm/radeon: don't mess with hot plug detect for eDP or LVDS (rhbz 726143)
 


More information about the scm-commits mailing list