History

sysctl: simplify ->strategy

name and nlen parameters passed to ->strategy hook are unused, remove them. In general ->strategy hook should know what it's doing, and don't do something tricky for which, say, pointer to original userspace array may be needed (name).

Alexey Dobriyan committed 18 years ago

Commit f221e721 parent f40cbaa16 files · +56 −73Browse files

Unified · Split

16 files
  1. arch/frv/kernel/pm.c +3 −3
  2. arch/mips/lasat/sysctl.c +8 −9
  3. drivers/char/random.c +1 −1
  4. include/linux/sysctl.h +1 −1
  5. include/net/ip.h +1 −1
  6. include/net/ndisc.h +2 −3
  7. ipc/ipc_sysctl.c +4 −5
  8. kernel/sysctl.c +13 −16
  9. kernel/utsname_sysctl.c +2 −3
  10. net/decnet/dn_dev.c +2 −2
  11. net/decnet/sysctl_net_decnet.c +2 −2
  12. net/ipv4/devinet.c +3 −4
  13. net/ipv4/route.c +1 −6
  14. net/ipv4/sysctl_net_ipv4.c +9 −9
  15. net/ipv6/addrconf.c +0 −1
  16. net/ipv6/ndisc.c +4 −7
arch/frv/kernel/pm.c+3−3
@@ -211,7 +211,7 @@ static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, · 210 unmodified lines
211211 return try_set_cmode(new_cmode)?:*lenp;
212212 }
213213
214−static int cmode_sysctl(ctl_table *table, int __user *name, int nlen,
214+static int cmode_sysctl(ctl_table *table,
215215 void __user *oldval, size_t __user *oldlenp,
216216 void __user *newval, size_t newlen)
217217 {
@@ -314,7 +314,7 @@ static int p0_procctl(ctl_table *ctl, int write, struct file *filp, · 96 unmodified lines
314314 return try_set_p0(new_p0)?:*lenp;
315315 }
316316
317−static int p0_sysctl(ctl_table *table, int __user *name, int nlen,
317+static int p0_sysctl(ctl_table *table,
318318 void __user *oldval, size_t __user *oldlenp,
319319 void __user *newval, size_t newlen)
320320 {
@@ -358,7 +358,7 @@ static int cm_procctl(ctl_table *ctl, int write, struct file *filp, · 37 unmodified lines
358358 return try_set_cm(new_cm)?:*lenp;
359359 }
360360
361−static int cm_sysctl(ctl_table *table, int __user *name, int nlen,
361+static int cm_sysctl(ctl_table *table,
362362 void __user *oldval, size_t __user *oldlenp,
363363 void __user *newval, size_t newlen)
364364 {
arch/mips/lasat/sysctl.c+8−9
@@ -38,14 +38,13 @@ · 37 unmodified lines
3838 #endif
3939
4040 /* Strategy function to write EEPROM after changing string entry */
41−int sysctl_lasatstring(ctl_table *table, int *name, int nlen,
41+int sysctl_lasatstring(ctl_table *table,
4242 void *oldval, size_t *oldlenp,
4343 void *newval, size_t newlen)
4444 {
4545 int r;
4646
47− r = sysctl_string(table, name,
48− nlen, oldval, oldlenp, newval, newlen);
47+ r = sysctl_string(table, oldval, oldlenp, newval, newlen);
4948 if (r < 0)
5049 return r;
5150
@@ -113,13 +112,13 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, · 61 unmodified lines
113112 #endif
114113
115114 /* Sysctl for setting the IP addresses */
116−int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen,
115+int sysctl_lasat_intvec(ctl_table *table,
117116 void *oldval, size_t *oldlenp,
118117 void *newval, size_t newlen)
119118 {
120119 int r;
121120
122− r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
121+ r = sysctl_intvec(table, oldval, oldlenp, newval, newlen);
123122 if (r < 0)
124123 return r;
125124
@@ -131,7 +130,7 @@ int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, · 5 unmodified lines
131130
132131 #ifdef CONFIG_DS1603
133132 /* Same for RTC */
134−int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen,
133+int sysctl_lasat_rtc(ctl_table *table,
135134 void *oldval, size_t *oldlenp,
136135 void *newval, size_t newlen)
137136 {
@@ -140,7 +139,7 @@ int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, · 2 unmodified lines
140139 rtctmp = read_persistent_clock();
141140 if (rtctmp < 0)
142141 rtctmp = 0;
143− r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
142+ r = sysctl_intvec(table, oldval, oldlenp, newval, newlen);
144143 if (r < 0)
145144 return r;
146145 if (newval && newlen)
@@ -211,13 +210,13 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, · 64 unmodified lines
211210 }
212211 #endif
213212
214−static int sysctl_lasat_prid(ctl_table *table, int *name, int nlen,
213+static int sysctl_lasat_prid(ctl_table *table,
215214 void *oldval, size_t *oldlenp,
216215 void *newval, size_t newlen)
217216 {
218217 int r;
219218
220− r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
219+ r = sysctl_intvec(table, oldval, oldlenp, newval, newlen);
221220 if (r < 0)
222221 return r;
223222 if (newval && newlen) {
drivers/char/random.c+1−1
@@ -1205,7 +1205,7 @@ static int proc_do_uuid(ctl_table *table, int write, struct file *filp, · 1204 unmodified lines
12051205 return proc_dostring(&fake_table, write, filp, buffer, lenp, ppos);
12061206 }
12071207
1208−static int uuid_strategy(ctl_table *table, int __user *name, int nlen,
1208+static int uuid_strategy(ctl_table *table,
12091209 void __user *oldval, size_t __user *oldlenp,
12101210 void __user *newval, size_t newlen)
12111211 {
include/linux/sysctl.h+1−1
@@ -972,7 +972,7 @@ extern int sysctl_perm(struct ctl_table_root *root, · 971 unmodified lines
972972
973973 typedef struct ctl_table ctl_table;
974974
975−typedef int ctl_handler (struct ctl_table *table, int __user *name, int nlen,
975+typedef int ctl_handler (struct ctl_table *table,
976976 void __user *oldval, size_t __user *oldlenp,
977977 void __user *newval, size_t newlen);
978978
include/net/ip.h+1−1
@@ -396,7 +396,7 @@ extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, · 395 unmodified lines
396396 int ipv4_doint_and_flush(ctl_table *ctl, int write,
397397 struct file* filp, void __user *buffer,
398398 size_t *lenp, loff_t *ppos);
399−int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen,
399+int ipv4_doint_and_flush_strategy(ctl_table *table,
400400 void __user *oldval, size_t __user *oldlenp,
401401 void __user *newval, size_t newlen);
402402 #ifdef CONFIG_PROC_FS
include/net/ndisc.h+2−3
@@ -129,9 +129,8 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, · 128 unmodified lines
129129 void __user *buffer,
130130 size_t *lenp,
131131 loff_t *ppos);
132−int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name,
133− int nlen, void __user *oldval,
134− size_t __user *oldlenp,
132+int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl,
133+ void __user *oldval, size_t __user *oldlenp,
135134 void __user *newval, size_t newlen);
136135 #endif
137136
ipc/ipc_sysctl.c+4−5
@@ -131,7 +131,7 @@ static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, · 130 unmodified lines
131131
132132 #ifdef CONFIG_SYSCTL_SYSCALL
133133 /* The generic sysctl ipc data routine. */
134−static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
134+static int sysctl_ipc_data(ctl_table *table,
135135 void __user *oldval, size_t __user *oldlenp,
136136 void __user *newval, size_t newlen)
137137 {
@@ -169,14 +169,13 @@ static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, · 31 unmodified lines
169169 return 1;
170170 }
171171
172−static int sysctl_ipc_registered_data(ctl_table *table, int __user *name,
173− int nlen, void __user *oldval, size_t __user *oldlenp,
172+static int sysctl_ipc_registered_data(ctl_table *table,
173+ void __user *oldval, size_t __user *oldlenp,
174174 void __user *newval, size_t newlen)
175175 {
176176 int rc;
177177
178− rc = sysctl_ipc_data(table, name, nlen, oldval, oldlenp, newval,
179− newlen);
178+ rc = sysctl_ipc_data(table, oldval, oldlenp, newval, newlen);
180179
181180 if (newval && newlen && rc > 0)
182181 /*
kernel/sysctl.c+13−16
@@ -1500,7 +1500,6 @@ void register_sysctl_root(struct ctl_table_root *root) · 1499 unmodified lines
15001500 /* Perform the actual read/write of a sysctl table entry. */
15011501 static int do_sysctl_strategy(struct ctl_table_root *root,
15021502 struct ctl_table *table,
1503− int __user *name, int nlen,
15041503 void __user *oldval, size_t __user *oldlenp,
15051504 void __user *newval, size_t newlen)
15061505 {
@@ -1514,8 +1513,7 @@ static int do_sysctl_strategy(struct ctl_table_root *root, · 7 unmodified lines
15141513 return -EPERM;
15151514
15161515 if (table->strategy) {
1517− rc = table->strategy(table, name, nlen, oldval, oldlenp,
1518− newval, newlen);
1516+ rc = table->strategy(table, oldval, oldlenp, newval, newlen);
15191517 if (rc < 0)
15201518 return rc;
15211519 if (rc > 0)
@@ -1525,8 +1523,7 @@ static int do_sysctl_strategy(struct ctl_table_root *root, · 3 unmodified lines
15251523 /* If there is no strategy routine, or if the strategy returns
15261524 * zero, proceed with automatic r/w */
15271525 if (table->data && table->maxlen) {
1528− rc = sysctl_data(table, name, nlen, oldval, oldlenp,
1529− newval, newlen);
1526+ rc = sysctl_data(table, oldval, oldlenp, newval, newlen);
15301527 if (rc < 0)
15311528 return rc;
15321529 }
@@ -1558,7 +1555,7 @@ repeat: · 25 unmodified lines
15581555 table = table->child;
15591556 goto repeat;
15601557 }
1561− error = do_sysctl_strategy(root, table, name, nlen,
1558+ error = do_sysctl_strategy(root, table,
15621559 oldval, oldlenp,
15631560 newval, newlen);
15641561 return error;
@@ -2707,7 +2704,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, · 1142 unmodified lines
27072704 */
27082705
27092706 /* The generic sysctl data routine (used if no strategy routine supplied) */
2710−int sysctl_data(struct ctl_table *table, int __user *name, int nlen,
2707+int sysctl_data(struct ctl_table *table,
27112708 void __user *oldval, size_t __user *oldlenp,
27122709 void __user *newval, size_t newlen)
27132710 {
@@ -2741,7 +2738,7 @@ int sysctl_data(struct ctl_table *table, int __user *name, int nlen, · 27 unmodified lines
27412738 }
27422739
27432740 /* The generic string strategy routine: */
2744−int sysctl_string(struct ctl_table *table, int __user *name, int nlen,
2741+int sysctl_string(struct ctl_table *table,
27452742 void __user *oldval, size_t __user *oldlenp,
27462743 void __user *newval, size_t newlen)
27472744 {
@@ -2787,7 +2784,7 @@ int sysctl_string(struct ctl_table *table, int __user *name, int nlen, · 39 unmodified lines
27872784 * are between the minimum and maximum values given in the arrays
27882785 * table->extra1 and table->extra2, respectively.
27892786 */
2790−int sysctl_intvec(struct ctl_table *table, int __user *name, int nlen,
2787+int sysctl_intvec(struct ctl_table *table,
27912788 void __user *oldval, size_t __user *oldlenp,
27922789 void __user *newval, size_t newlen)
27932790 {
@@ -2823,7 +2820,7 @@ int sysctl_intvec(struct ctl_table *table, int __user *name, int nlen, · 29 unmodified lines
28232820 }
28242821
28252822 /* Strategy function to convert jiffies to seconds */
2826−int sysctl_jiffies(struct ctl_table *table, int __user *name, int nlen,
2823+int sysctl_jiffies(struct ctl_table *table,
28272824 void __user *oldval, size_t __user *oldlenp,
28282825 void __user *newval, size_t newlen)
28292826 {
@@ -2857,7 +2854,7 @@ int sysctl_jiffies(struct ctl_table *table, int __user *name, int nlen, · 27 unmodified lines
28572854 }
28582855
28592856 /* Strategy function to convert jiffies to seconds */
2860−int sysctl_ms_jiffies(struct ctl_table *table, int __user *name, int nlen,
2857+int sysctl_ms_jiffies(struct ctl_table *table,
28612858 void __user *oldval, size_t __user *oldlenp,
28622859 void __user *newval, size_t newlen)
28632860 {
@@ -2912,35 +2909,35 @@ asmlinkage long sys_sysctl(struct __sysctl_args __user *args) · 48 unmodified lines
29122909 return error;
29132910 }
29142911
2915−int sysctl_data(struct ctl_table *table, int __user *name, int nlen,
2912+int sysctl_data(struct ctl_table *table,
29162913 void __user *oldval, size_t __user *oldlenp,
29172914 void __user *newval, size_t newlen)
29182915 {
29192916 return -ENOSYS;
29202917 }
29212918
2922−int sysctl_string(struct ctl_table *table, int __user *name, int nlen,
2919+int sysctl_string(struct ctl_table *table,
29232920 void __user *oldval, size_t __user *oldlenp,
29242921 void __user *newval, size_t newlen)
29252922 {
29262923 return -ENOSYS;
29272924 }
29282925
2929−int sysctl_intvec(struct ctl_table *table, int __user *name, int nlen,
2926+int sysctl_intvec(struct ctl_table *table,
29302927 void __user *oldval, size_t __user *oldlenp,
29312928 void __user *newval, size_t newlen)
29322929 {
29332930 return -ENOSYS;
29342931 }
29352932
2936−int sysctl_jiffies(struct ctl_table *table, int __user *name, int nlen,
2933+int sysctl_jiffies(struct ctl_table *table,
29372934 void __user *oldval, size_t __user *oldlenp,
29382935 void __user *newval, size_t newlen)
29392936 {
29402937 return -ENOSYS;
29412938 }
29422939
2943−int sysctl_ms_jiffies(struct ctl_table *table, int __user *name, int nlen,
2940+int sysctl_ms_jiffies(struct ctl_table *table,
29442941 void __user *oldval, size_t __user *oldlenp,
29452942 void __user *newval, size_t newlen)
29462943 {
kernel/utsname_sysctl.c+2−3
@@ -60,7 +60,7 @@ static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, · 59 unmodified lines
6060
6161 #ifdef CONFIG_SYSCTL_SYSCALL
6262 /* The generic string strategy routine: */
63−static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen,
63+static int sysctl_uts_string(ctl_table *table,
6464 void __user *oldval, size_t __user *oldlenp,
6565 void __user *newval, size_t newlen)
6666 {
@@ -69,8 +69,7 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, · 2 unmodified lines
6969 write = newval && newlen;
7070 memcpy(&uts_table, table, sizeof(uts_table));
7171 uts_table.data = get_uts(table, write);
72− r = sysctl_string(&uts_table, name, nlen,
73− oldval, oldlenp, newval, newlen);
72+ r = sysctl_string(&uts_table, oldval, oldlenp, newval, newlen);
7473 put_uts(table, write, uts_table.data);
7574 return r;
7675 }
net/decnet/dn_dev.c+2−2
@@ -166,7 +166,7 @@ static int max_priority[] = { 127 }; /* From DECnet spec */ · 165 unmodified lines
166166
167167 static int dn_forwarding_proc(ctl_table *, int, struct file *,
168168 void __user *, size_t *, loff_t *);
169−static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen,
169+static int dn_forwarding_sysctl(ctl_table *table,
170170 void __user *oldval, size_t __user *oldlenp,
171171 void __user *newval, size_t newlen);
172172
@@ -318,7 +318,7 @@ static int dn_forwarding_proc(ctl_table *table, int write, · 145 unmodified lines
318318 #endif
319319 }
320320
321−static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen,
321+static int dn_forwarding_sysctl(ctl_table *table,
322322 void __user *oldval, size_t __user *oldlenp,
323323 void __user *newval, size_t newlen)
324324 {
net/decnet/sysctl_net_decnet.c+2−2
@@ -132,7 +132,7 @@ static int parse_addr(__le16 *addr, char *str) · 131 unmodified lines
132132 }
133133
134134
135−static int dn_node_address_strategy(ctl_table *table, int __user *name, int nlen,
135+static int dn_node_address_strategy(ctl_table *table,
136136 void __user *oldval, size_t __user *oldlenp,
137137 void __user *newval, size_t newlen)
138138 {
@@ -217,7 +217,7 @@ static int dn_node_address_handler(ctl_table *table, int write, · 78 unmodified lines
217217 }
218218
219219
220−static int dn_def_dev_strategy(ctl_table *table, int __user *name, int nlen,
220+static int dn_def_dev_strategy(ctl_table *table,
221221 void __user *oldval, size_t __user *oldlenp,
222222 void __user *newval, size_t newlen)
223223 {
net/ipv4/devinet.c+3−4
@@ -1283,7 +1283,7 @@ static int devinet_conf_proc(ctl_table *ctl, int write, · 1282 unmodified lines
12831283 return ret;
12841284 }
12851285
1286−static int devinet_conf_sysctl(ctl_table *table, int __user *name, int nlen,
1286+static int devinet_conf_sysctl(ctl_table *table,
12871287 void __user *oldval, size_t __user *oldlenp,
12881288 void __user *newval, size_t newlen)
12891289 {
@@ -1379,12 +1379,11 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write, · 89 unmodified lines
13791379 return ret;
13801380 }
13811381
1382−int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen,
1382+int ipv4_doint_and_flush_strategy(ctl_table *table,
13831383 void __user *oldval, size_t __user *oldlenp,
13841384 void __user *newval, size_t newlen)
13851385 {
1386− int ret = devinet_conf_sysctl(table, name, nlen, oldval, oldlenp,
1387− newval, newlen);
1386+ int ret = devinet_conf_sysctl(table, oldval, oldlenp, newval, newlen);
13881387 struct net *net = table->extra2;
13891388
13901389 if (ret == 1)
net/ipv4/route.c+1−6
@@ -2908,8 +2908,6 @@ static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, · 2907 unmodified lines
29082908 }
29092909
29102910 static int ipv4_sysctl_rtcache_flush_strategy(ctl_table *table,
2911− int __user *name,
2912− int nlen,
29132911 void __user *oldval,
29142912 size_t __user *oldlenp,
29152913 void __user *newval,
@@ -2972,16 +2970,13 @@ static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write, · 56 unmodified lines
29722970 }
29732971
29742972 static int ipv4_sysctl_rt_secret_interval_strategy(ctl_table *table,
2975− int __user *name,
2976− int nlen,
29772973 void __user *oldval,
29782974 size_t __user *oldlenp,
29792975 void __user *newval,
29802976 size_t newlen)
29812977 {
29822978 int old = ip_rt_secret_interval;
2983− int ret = sysctl_jiffies(table, name, nlen, oldval, oldlenp, newval,
2984− newlen);
2979+ int ret = sysctl_jiffies(table, oldval, oldlenp, newval, newlen);
29852980
29862981 rt_secret_reschedule(old);
29872982
net/ipv4/sysctl_net_ipv4.c+9−9
@@ -64,8 +64,8 @@ static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp, · 63 unmodified lines
6464 }
6565
6666 /* Validate changes from sysctl interface. */
67−static int ipv4_sysctl_local_port_range(ctl_table *table, int __user *name,
68− int nlen, void __user *oldval,
67+static int ipv4_sysctl_local_port_range(ctl_table *table,
68+ void __user *oldval,
6969 size_t __user *oldlenp,
7070 void __user *newval, size_t newlen)
7171 {
@@ -80,7 +80,7 @@ static int ipv4_sysctl_local_port_range(ctl_table *table, int __user *name, · 8 unmodified lines
8080 };
8181
8282 inet_get_local_port_range(range, range + 1);
83− ret = sysctl_intvec(&tmp, name, nlen, oldval, oldlenp, newval, newlen);
83+ ret = sysctl_intvec(&tmp, oldval, oldlenp, newval, newlen);
8484 if (ret == 0 && newval && newlen) {
8585 if (range[1] < range[0])
8686 ret = -EINVAL;
@@ -109,8 +109,8 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * · 22 unmodified lines
109109 return ret;
110110 }
111111
112−static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name,
113− int nlen, void __user *oldval,
112+static int sysctl_tcp_congestion_control(ctl_table *table,
113+ void __user *oldval,
114114 size_t __user *oldlenp,
115115 void __user *newval, size_t newlen)
116116 {
@@ -122,7 +122,7 @@ static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, · 5 unmodified lines
122122 int ret;
123123
124124 tcp_get_default_congestion_control(val);
125− ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
125+ ret = sysctl_string(&tbl, oldval, oldlenp, newval, newlen);
126126 if (ret == 1 && newval && newlen)
127127 ret = tcp_set_default_congestion_control(val);
128128 return ret;
@@ -165,8 +165,8 @@ static int proc_allowed_congestion_control(ctl_table *ctl, · 36 unmodified lines
165165 return ret;
166166 }
167167
168−static int strategy_allowed_congestion_control(ctl_table *table, int __user *name,
169− int nlen, void __user *oldval,
168+static int strategy_allowed_congestion_control(ctl_table *table,
169+ void __user *oldval,
170170 size_t __user *oldlenp,
171171 void __user *newval,
172172 size_t newlen)
@@ -179,7 +179,7 @@ static int strategy_allowed_congestion_control(ctl_table *table, int __user *nam · 6 unmodified lines
179179 return -ENOMEM;
180180
181181 tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
182− ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
182+ ret = sysctl_string(&tbl, oldval, oldlenp, newval, newlen);
183183 if (ret == 1 && newval && newlen)
184184 ret = tcp_set_allowed_congestion_control(tbl.data);
185185 kfree(tbl.data);
net/ipv6/addrconf.c+0−1
@@ -3982,7 +3982,6 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write, struct file * filp, · 3981 unmodified lines
39823982 }
39833983
39843984 static int addrconf_sysctl_forward_strategy(ctl_table *table,
3985− int __user *name, int nlen,
39863985 void __user *oldval,
39873986 size_t __user *oldlenp,
39883987 void __user *newval, size_t newlen)
net/ipv6/ndisc.c+4−7
@@ -1730,9 +1730,8 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f · 1729 unmodified lines
17301730 return ret;
17311731 }
17321732
1733−int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name,
1734− int nlen, void __user *oldval,
1735− size_t __user *oldlenp,
1733+int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl,
1734+ void __user *oldval, size_t __user *oldlenp,
17361735 void __user *newval, size_t newlen)
17371736 {
17381737 struct net_device *dev = ctl->extra1;
@@ -1745,13 +1744,11 @@ int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, · 6 unmodified lines
17451744
17461745 switch (ctl->ctl_name) {
17471746 case NET_NEIGH_REACHABLE_TIME:
1748− ret = sysctl_jiffies(ctl, name, nlen,
1749− oldval, oldlenp, newval, newlen);
1747+ ret = sysctl_jiffies(ctl, oldval, oldlenp, newval, newlen);
17501748 break;
17511749 case NET_NEIGH_RETRANS_TIME_MS:
17521750 case NET_NEIGH_REACHABLE_TIME_MS:
1753− ret = sysctl_ms_jiffies(ctl, name, nlen,
1754− oldval, oldlenp, newval, newlen);
1751+ ret = sysctl_ms_jiffies(ctl, oldval, oldlenp, newval, newlen);
17551752 break;
17561753 default:
17571754 ret = 0;