From bd32fda778b31d509e916ab51a5eb8f48a87d728 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Sat, 21 Jan 2012 12:35:23 -0800 Subject: [PATCH] --- yaml --- r: 295449 b: refs/heads/master c: ec6a52668d0bbc6d648e978c327150254bf1ce7f h: refs/heads/master i: 295447: e4545739ddef9f119f8b3320deb7521d47f8f573 v: v3 --- [refs] | 2 +- trunk/fs/proc/proc_sysctl.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3c688b4f9eaf..29274dbff1e3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6e9d5164153ad6539edd31e7afb02a3e79124cad +refs/heads/master: ec6a52668d0bbc6d648e978c327150254bf1ce7f diff --git a/trunk/fs/proc/proc_sysctl.c b/trunk/fs/proc/proc_sysctl.c index 5704ff0e889f..9b91deeeb56c 100644 --- a/trunk/fs/proc/proc_sysctl.c +++ b/trunk/fs/proc/proc_sysctl.c @@ -1076,6 +1076,7 @@ struct ctl_table_header *__register_sysctl_paths( struct nsproxy *namespaces, const struct ctl_path *path, struct ctl_table *table) { + struct ctl_table *ctl_table_arg = table; struct ctl_table_header *header = NULL; const struct ctl_path *component; char *new_path, *pos; @@ -1090,7 +1091,15 @@ struct ctl_table_header *__register_sysctl_paths( if (!pos) goto out; } + while (table->procname && table->child && !table[1].procname) { + pos = append_path(new_path, pos, table->procname); + if (!pos) + goto out; + table = table->child; + } header = __register_sysctl_table(root, namespaces, new_path, table); + if (header) + header->ctl_table_arg = ctl_table_arg; out: kfree(new_path); return header;