aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/route.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 113cd2512ba7..79c1e74263a1 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2873,22 +2873,20 @@ void ip_rt_multicast_event(struct in_device *in_dev)
2873} 2873}
2874 2874
2875#ifdef CONFIG_SYSCTL 2875#ifdef CONFIG_SYSCTL
2876static int ipv4_sysctl_rtcache_flush(ctl_table *ctl, int write, 2876static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write,
2877 struct file *filp, void __user *buffer, 2877 struct file *filp, void __user *buffer,
2878 size_t *lenp, loff_t *ppos) 2878 size_t *lenp, loff_t *ppos)
2879{ 2879{
2880 if (write) { 2880 if (write) {
2881 int flush_delay; 2881 int flush_delay;
2882 ctl_table ctl;
2882 struct net *net; 2883 struct net *net;
2883 static DEFINE_MUTEX(flush_mutex);
2884 2884
2885 mutex_lock(&flush_mutex); 2885 memcpy(&ctl, __ctl, sizeof(ctl));
2886 ctl->data = &flush_delay; 2886 ctl.data = &flush_delay;
2887 proc_dointvec(ctl, write, filp, buffer, lenp, ppos); 2887 proc_dointvec(&ctl, write, filp, buffer, lenp, ppos);
2888 ctl->data = NULL;
2889 mutex_unlock(&flush_mutex);
2890 2888
2891 net = (struct net *)ctl->extra1; 2889 net = (struct net *)__ctl->extra1;
2892 rt_cache_flush(net, flush_delay); 2890 rt_cache_flush(net, flush_delay);
2893 return 0; 2891 return 0;
2894 } 2892 }