]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: add a missing unregister_pernet_subsys call
authorNeil Horman <nhorman@tuxdriver.com>
Fri, 24 Sep 2010 09:55:52 +0000 (09:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Sep 2010 02:09:25 +0000 (19:09 -0700)
commit68ddb41c873d73f209c50bc00ea6f6ff42c2e85f
tree6fbbaa255617783eda308a00a21065bc99ad0d21
parentaaca7b70ad487badc0d9621a750759ce2c28d029
ipv6: add a missing unregister_pernet_subsys call

Clean up a missing exit path in the ipv6 module init routines.  In
addrconf_init we call ipv6_addr_label_init which calls register_pernet_subsys
for the ipv6_addr_label_ops structure.  But if module loading fails, or if the
ipv6 module is removed, there is no corresponding unregister_pernet_subsys call,
which leaves a now-bogus address on the pernet_list, leading to oopses in
subsequent registrations.  This patch cleans up both the failed load path and
the unload path.  Tested by myself with good results.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
 include/net/addrconf.h |    1 +
 net/ipv6/addrconf.c    |   11 ++++++++---
 net/ipv6/addrlabel.c   |    5 +++++
 3 files changed, 14 insertions(+), 3 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/addrconf.h
net/ipv6/addrconf.c
net/ipv6/addrlabel.c