diff options
author | Julian Anastasov <ja@ssi.bg> | 2014-06-12 02:17:55 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2014-06-13 03:22:25 -0400 |
commit | 9802d21e7a0b0d2167ef745edc1f4ea7a0fc6ea3 (patch) | |
tree | 63d2e46b26f1913d3b913aaea37a482ae91b8a89 /net | |
parent | f44a5f45f544561302e855e7bd104e5f506ec01b (diff) |
ipvs: stop tot_stats estimator only under CONFIG_SYSCTL
The tot_stats estimator is started only when CONFIG_SYSCTL
is defined. But it is stopped without checking CONFIG_SYSCTL.
Fix the crash by moving ip_vs_stop_estimator into
ip_vs_control_net_cleanup_sysctl.
The change is needed after commit 14e405461e664b
("IPVS: Add __ip_vs_control_{init,cleanup}_sysctl()") from 2.6.39.
Reported-by: Jet Chen <jet.chen@intel.com>
Tested-by: Jet Chen <jet.chen@intel.com>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index c42e83d2751c..581a6584ed0c 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -3778,6 +3778,7 @@ static void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net) | |||
3778 | cancel_delayed_work_sync(&ipvs->defense_work); | 3778 | cancel_delayed_work_sync(&ipvs->defense_work); |
3779 | cancel_work_sync(&ipvs->defense_work.work); | 3779 | cancel_work_sync(&ipvs->defense_work.work); |
3780 | unregister_net_sysctl_table(ipvs->sysctl_hdr); | 3780 | unregister_net_sysctl_table(ipvs->sysctl_hdr); |
3781 | ip_vs_stop_estimator(net, &ipvs->tot_stats); | ||
3781 | } | 3782 | } |
3782 | 3783 | ||
3783 | #else | 3784 | #else |
@@ -3840,7 +3841,6 @@ void __net_exit ip_vs_control_net_cleanup(struct net *net) | |||
3840 | struct netns_ipvs *ipvs = net_ipvs(net); | 3841 | struct netns_ipvs *ipvs = net_ipvs(net); |
3841 | 3842 | ||
3842 | ip_vs_trash_cleanup(net); | 3843 | ip_vs_trash_cleanup(net); |
3843 | ip_vs_stop_estimator(net, &ipvs->tot_stats); | ||
3844 | ip_vs_control_net_cleanup_sysctl(net); | 3844 | ip_vs_control_net_cleanup_sysctl(net); |
3845 | remove_proc_entry("ip_vs_stats_percpu", net->proc_net); | 3845 | remove_proc_entry("ip_vs_stats_percpu", net->proc_net); |
3846 | remove_proc_entry("ip_vs_stats", net->proc_net); | 3846 | remove_proc_entry("ip_vs_stats", net->proc_net); |