[lkml]   [2014]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 3.13 34/46] fs/proc/proc_devtree.c: remove empty /proc/device-tree when no openfirmware exists.
3.13-stable review patch.  If anyone has any objections, please let me know.


From: Dave Jones <>

commit c1d867a54d426b45da017fbe8e585f8a3064ce8d upstream.

Distribution kernels might want to build in support for /proc/device-tree
for kernels that might end up running on hardware that doesn't support
openfirmware. This results in an empty /proc/device-tree existing.
Remove it if the OFW root node doesn't exist.

This situation actually confuses grub2, resulting in install failures.
grub2 sees the /proc/device-tree and picks the wrong install target cf.
grub should be more robust, but still, leaving an empty proc dir seems


Signed-off-by: Dave Jones <>
Cc: Al Viro <>
Cc: Paul Mackerras <>
Cc: Josh Boyer <>
Cc: Benjamin Herrenschmidt <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Greg Kroah-Hartman <>

fs/proc/proc_devtree.c | 1 +
1 file changed, 1 insertion(+)

--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -232,6 +232,7 @@ void __init proc_device_tree_init(void)
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");

 \ /
  Last update: 2014-03-28 19:21    [W:0.153 / U:27.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site