Message ID | 1304250241-26138-1-git-send-email-lucian.grijincu@gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Sun, May 1, 2011 at 1:44 PM, Lucian Adrian Grijincu <lucian.grijincu@gmail.com> wrote: > ctl_table_headers registered with register_net_sysctl_table should > have been unregistered with the equivalent unregister_net_sysctl_table > > Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com> David: I sent you this patch a while back but it was mixed with other unrelated patches that were mostly ignored. Again, to clarify: it does not matter at the moment if register_net_sysctl_table or unregister_sysctl_table is called because both to the same thing: void unregister_net_sysctl_table(struct ctl_table_header *header) { unregister_sysctl_table(header); } EXPORT_SYMBOL_GPL(unregister_net_sysctl_table); We should either get rid of unregister_net_sysctl_table or use it consistently.
From: Lucian Adrian Grijincu <lucian.grijincu@gmail.com> Date: Sun, 1 May 2011 13:48:04 +0200 > On Sun, May 1, 2011 at 1:44 PM, Lucian Adrian Grijincu > <lucian.grijincu@gmail.com> wrote: >> ctl_table_headers registered with register_net_sysctl_table should >> have been unregistered with the equivalent unregister_net_sysctl_table >> >> Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com> > > > David: I sent you this patch a while back but it was mixed with other > unrelated patches that were mostly ignored. > > Again, to clarify: it does not matter at the moment if > register_net_sysctl_table or unregister_sysctl_table is called because > both to the same thing: ... > We should either get rid of unregister_net_sysctl_table or use it consistently. Applied to net-2.6, thanks Lucian. -- 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/ipv4/devinet.c b/net/ipv4/devinet.c index 5345b0b..cd9ca08 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1680,7 +1680,7 @@ static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf) return; cnf->sysctl = NULL; - unregister_sysctl_table(t->sysctl_header); + unregister_net_sysctl_table(t->sysctl_header); kfree(t->dev_name); kfree(t); } diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 1493534..a7bda07 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -4537,7 +4537,7 @@ static void __addrconf_sysctl_unregister(struct ipv6_devconf *p) t = p->sysctl; p->sysctl = NULL; - unregister_sysctl_table(t->sysctl_header); + unregister_net_sysctl_table(t->sysctl_header); kfree(t->dev_name); kfree(t); }
ctl_table_headers registered with register_net_sysctl_table should have been unregistered with the equivalent unregister_net_sysctl_table Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com> --- net/ipv4/devinet.c | 2 +- net/ipv6/addrconf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)