Skip to content

Commit

Permalink
ipvs: fix crash in ip_vs_control_net_cleanup on unload
Browse files Browse the repository at this point in the history
	commit 14e4054 (2.6.39)
("Add __ip_vs_control_{init,cleanup}_sysctl()")
introduced regression due to wrong __net_init for
__ip_vs_control_cleanup_sysctl. This leads to crash when
the ip_vs module is unloaded.

	Fix it by changing __net_init to __net_exit for
the function that is already renamed to ip_vs_control_net_cleanup_sysctl.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Julian Anastasov authored and Pablo Neira Ayuso committed Apr 25, 2012
1 parent 7118c07 commit 8f9b9a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/netfilter/ipvs/ip_vs_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3680,7 +3680,7 @@ int __net_init ip_vs_control_net_init_sysctl(struct net *net)
return 0;
}

void __net_init ip_vs_control_net_cleanup_sysctl(struct net *net)
void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net)
{
struct netns_ipvs *ipvs = net_ipvs(net);

Expand All @@ -3692,7 +3692,7 @@ void __net_init ip_vs_control_net_cleanup_sysctl(struct net *net)
#else

int __net_init ip_vs_control_net_init_sysctl(struct net *net) { return 0; }
void __net_init ip_vs_control_net_cleanup_sysctl(struct net *net) { }
void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net) { }

#endif

Expand Down

0 comments on commit 8f9b9a2

Please sign in to comment.