]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/proc/proc_devtree.c
Merge branch 'stable/for-jens-3.14' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-bionic-kernel.git] / fs / proc / proc_devtree.c
index 70779b2fc2090b98b741d10f3f37c4a8c1379bf9..c82dd5147845d07053fd1fa37398d8c6da2560f5 100644 (file)
@@ -74,9 +74,9 @@ __proc_device_tree_add_prop(struct proc_dir_entry *de, struct property *pp,
                return NULL;
 
        if (!strncmp(name, "security-", 9))
-               ent->size = 0; /* don't leak number of password chars */
+               proc_set_size(ent, 0); /* don't leak number of password chars */
        else
-               ent->size = pp->length;
+               proc_set_size(ent, pp->length);
 
        return ent;
 }
@@ -232,6 +232,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;
        }