Message ID | 20081107142027.249107446@nptl.frec.bull.fr |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Benjamin Thery <benjamin.thery@bull.net> Date: Fri, 07 Nov 2008 15:20:26 +0100 > The order of cleanup operations in the error/exit section of ip6_mr_init() > is completely inversed. It should be the other way around. > Also a del_timer() is missing in the error path. > > Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> Applied, thanks a lot Benjamin. -- 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
Index: net-2.6/net/ipv6/ip6mr.c =================================================================== --- net-2.6.orig/net/ipv6/ip6mr.c +++ net-2.6/net/ipv6/ip6mr.c @@ -981,14 +981,15 @@ int __init ip6_mr_init(void) goto proc_cache_fail; #endif return 0; -reg_notif_fail: - kmem_cache_destroy(mrt_cachep); #ifdef CONFIG_PROC_FS -proc_vif_fail: - unregister_netdevice_notifier(&ip6_mr_notifier); proc_cache_fail: proc_net_remove(&init_net, "ip6_mr_vif"); +proc_vif_fail: + unregister_netdevice_notifier(&ip6_mr_notifier); #endif +reg_notif_fail: + del_timer(&ipmr_expire_timer); + kmem_cache_destroy(mrt_cachep); return err; }
The order of cleanup operations in the error/exit section of ip6_mr_init() is completely inversed. It should be the other way around. Also a del_timer() is missing in the error path. Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> --- net/ipv6/ip6mr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)