Message ID | m11v3utagp.fsf@fess.ebiederm.org |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: ebiederm@xmission.com (Eric W. Biederman) Date: Sun, 30 Jan 2011 12:15:02 -0800 > > In my testing of 2.6.37 I was occassionally getting a warning about > sysctl table entries being unregistered in the wrong order. Digging > in it turns out this dates back to the last great sysctl reorg done > where Al Viro introduced the requirement that sysctl directories > needed to be created before and destroyed after the files in them. > > It turns out that in that great reorg /proc/sys/net/ipv6/neigh was > overlooked. So this patch fixes that oversight and makes an annoying > warning message go away. > >>------------[ cut here ]------------ >>WARNING: at kernel/sysctl.c:1992 unregister_sysctl_table+0x134/0x164() >>Pid: 23951, comm: kworker/u:3 Not tainted 2.6.37-350888.2010AroraKernelBeta.fc14.x86_64 #1 >>Call Trace: ... > > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Applied and queued for -stable, thanks a lot Eric. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index fa1d8f4..7cb65ef 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c @@ -15,6 +15,8 @@ #include <net/addrconf.h> #include <net/inet_frag.h> +static struct ctl_table empty[1]; + static ctl_table ipv6_table_template[] = { { .procname = "route", @@ -35,6 +37,12 @@ static ctl_table ipv6_table_template[] = { .mode = 0644, .proc_handler = proc_dointvec }, + { + .procname = "neigh", + .maxlen = 0, + .mode = 0555, + .child = empty, + }, { } }; @@ -152,7 +160,6 @@ static struct ctl_table_header *ip6_base; int ipv6_static_sysctl_register(void) { - static struct ctl_table empty[1]; ip6_base = register_sysctl_paths(net_ipv6_ctl_path, empty); if (ip6_base == NULL) return -ENOMEM;