diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-12-10 05:19:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-10 12:55:41 -0500 |
commit | 1f29bcd739972f71f2fd5d5d265daf3e1208fa5e (patch) | |
tree | 96e20e4d0a077d813d8625d6919aba9bd0b5ed13 | |
parent | 98d7340c360993fdd703609ff7462051e03cc2fb (diff) |
[PATCH] sysctl: remove unused "context" param
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andi Kleen <ak@suse.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/frv/kernel/pm.c | 6 | ||||
-rw-r--r-- | arch/mips/lasat/sysctl.c | 17 | ||||
-rw-r--r-- | arch/x86_64/kernel/vsyscall.c | 3 | ||||
-rw-r--r-- | drivers/char/random.c | 2 | ||||
-rw-r--r-- | include/linux/sysctl.h | 5 | ||||
-rw-r--r-- | include/net/ip.h | 3 | ||||
-rw-r--r-- | include/net/sctp/sctp.h | 2 | ||||
-rw-r--r-- | kernel/sysctl.c | 47 | ||||
-rw-r--r-- | net/decnet/dn_dev.c | 6 | ||||
-rw-r--r-- | net/decnet/sysctl_net_decnet.c | 6 | ||||
-rw-r--r-- | net/ipv4/devinet.c | 3 | ||||
-rw-r--r-- | net/ipv4/route.c | 3 | ||||
-rw-r--r-- | net/ipv4/sysctl_net_ipv4.c | 16 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 3 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 9 |
15 files changed, 55 insertions, 76 deletions
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index c1d9fc8f1a85..ee677ced7b68 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c | |||
@@ -223,7 +223,7 @@ static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, | |||
223 | 223 | ||
224 | static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, | 224 | static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, |
225 | void __user *oldval, size_t __user *oldlenp, | 225 | void __user *oldval, size_t __user *oldlenp, |
226 | void __user *newval, size_t newlen, void **context) | 226 | void __user *newval, size_t newlen) |
227 | { | 227 | { |
228 | if (oldval && oldlenp) { | 228 | if (oldval && oldlenp) { |
229 | size_t oldlen; | 229 | size_t oldlen; |
@@ -326,7 +326,7 @@ static int p0_procctl(ctl_table *ctl, int write, struct file *filp, | |||
326 | 326 | ||
327 | static int p0_sysctl(ctl_table *table, int __user *name, int nlen, | 327 | static int p0_sysctl(ctl_table *table, int __user *name, int nlen, |
328 | void __user *oldval, size_t __user *oldlenp, | 328 | void __user *oldval, size_t __user *oldlenp, |
329 | void __user *newval, size_t newlen, void **context) | 329 | void __user *newval, size_t newlen) |
330 | { | 330 | { |
331 | if (oldval && oldlenp) { | 331 | if (oldval && oldlenp) { |
332 | size_t oldlen; | 332 | size_t oldlen; |
@@ -370,7 +370,7 @@ static int cm_procctl(ctl_table *ctl, int write, struct file *filp, | |||
370 | 370 | ||
371 | static int cm_sysctl(ctl_table *table, int __user *name, int nlen, | 371 | static int cm_sysctl(ctl_table *table, int __user *name, int nlen, |
372 | void __user *oldval, size_t __user *oldlenp, | 372 | void __user *oldval, size_t __user *oldlenp, |
373 | void __user *newval, size_t newlen, void **context) | 373 | void __user *newval, size_t newlen) |
374 | { | 374 | { |
375 | if (oldval && oldlenp) { | 375 | if (oldval && oldlenp) { |
376 | size_t oldlen; | 376 | size_t oldlen; |
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c index da35d4555491..12878359f2c8 100644 --- a/arch/mips/lasat/sysctl.c +++ b/arch/mips/lasat/sysctl.c | |||
@@ -40,12 +40,12 @@ static DEFINE_MUTEX(lasat_info_mutex); | |||
40 | /* Strategy function to write EEPROM after changing string entry */ | 40 | /* 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, int *name, int nlen, |
42 | void *oldval, size_t *oldlenp, | 42 | void *oldval, size_t *oldlenp, |
43 | void *newval, size_t newlen, void **context) | 43 | void *newval, size_t newlen) |
44 | { | 44 | { |
45 | int r; | 45 | int r; |
46 | mutex_lock(&lasat_info_mutex); | 46 | mutex_lock(&lasat_info_mutex); |
47 | r = sysctl_string(table, name, | 47 | r = sysctl_string(table, name, |
48 | nlen, oldval, oldlenp, newval, newlen, context); | 48 | nlen, oldval, oldlenp, newval, newlen); |
49 | if (r < 0) { | 49 | if (r < 0) { |
50 | mutex_unlock(&lasat_info_mutex); | 50 | mutex_unlock(&lasat_info_mutex); |
51 | return r; | 51 | return r; |
@@ -119,11 +119,11 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, | |||
119 | /* Sysctl for setting the IP addresses */ | 119 | /* Sysctl for setting the IP addresses */ |
120 | int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, | 120 | int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, |
121 | void *oldval, size_t *oldlenp, | 121 | void *oldval, size_t *oldlenp, |
122 | void *newval, size_t newlen, void **context) | 122 | void *newval, size_t newlen) |
123 | { | 123 | { |
124 | int r; | 124 | int r; |
125 | mutex_lock(&lasat_info_mutex); | 125 | mutex_lock(&lasat_info_mutex); |
126 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); | 126 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); |
127 | if (r < 0) { | 127 | if (r < 0) { |
128 | mutex_unlock(&lasat_info_mutex); | 128 | mutex_unlock(&lasat_info_mutex); |
129 | return r; | 129 | return r; |
@@ -139,14 +139,14 @@ int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen, | |||
139 | /* Same for RTC */ | 139 | /* Same for RTC */ |
140 | int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, | 140 | int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen, |
141 | void *oldval, size_t *oldlenp, | 141 | void *oldval, size_t *oldlenp, |
142 | void *newval, size_t newlen, void **context) | 142 | void *newval, size_t newlen) |
143 | { | 143 | { |
144 | int r; | 144 | int r; |
145 | mutex_lock(&lasat_info_mutex); | 145 | mutex_lock(&lasat_info_mutex); |
146 | rtctmp = ds1603_read(); | 146 | rtctmp = ds1603_read(); |
147 | if (rtctmp < 0) | 147 | if (rtctmp < 0) |
148 | rtctmp = 0; | 148 | rtctmp = 0; |
149 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); | 149 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); |
150 | if (r < 0) { | 150 | if (r < 0) { |
151 | mutex_unlock(&lasat_info_mutex); | 151 | mutex_unlock(&lasat_info_mutex); |
152 | return r; | 152 | return r; |
@@ -251,13 +251,12 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, | |||
251 | 251 | ||
252 | static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, | 252 | static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, |
253 | void *oldval, size_t *oldlenp, | 253 | void *oldval, size_t *oldlenp, |
254 | void *newval, size_t newlen, | 254 | void *newval, size_t newlen) |
255 | void **context) | ||
256 | { | 255 | { |
257 | int r; | 256 | int r; |
258 | 257 | ||
259 | mutex_lock(&lasat_info_mutex); | 258 | mutex_lock(&lasat_info_mutex); |
260 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen, context); | 259 | r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); |
261 | if (r < 0) { | 260 | if (r < 0) { |
262 | mutex_unlock(&lasat_info_mutex); | 261 | mutex_unlock(&lasat_info_mutex); |
263 | return r; | 262 | return r; |
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index 4a673f5397a0..2433d6fc68b1 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c | |||
@@ -225,8 +225,7 @@ out: | |||
225 | 225 | ||
226 | static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen, | 226 | static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen, |
227 | void __user *oldval, size_t __user *oldlenp, | 227 | void __user *oldval, size_t __user *oldlenp, |
228 | void __user *newval, size_t newlen, | 228 | void __user *newval, size_t newlen) |
229 | void **context) | ||
230 | { | 229 | { |
231 | return -ENOSYS; | 230 | return -ENOSYS; |
232 | } | 231 | } |
diff --git a/drivers/char/random.c b/drivers/char/random.c index 092a01cc02da..13d0b1350a62 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -1203,7 +1203,7 @@ static int proc_do_uuid(ctl_table *table, int write, struct file *filp, | |||
1203 | 1203 | ||
1204 | static int uuid_strategy(ctl_table *table, int __user *name, int nlen, | 1204 | static int uuid_strategy(ctl_table *table, int __user *name, int nlen, |
1205 | void __user *oldval, size_t __user *oldlenp, | 1205 | void __user *oldval, size_t __user *oldlenp, |
1206 | void __user *newval, size_t newlen, void **context) | 1206 | void __user *newval, size_t newlen) |
1207 | { | 1207 | { |
1208 | unsigned char tmp_uuid[16], *uuid; | 1208 | unsigned char tmp_uuid[16], *uuid; |
1209 | unsigned int len; | 1209 | unsigned int len; |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 94316a98e0d0..6d8846e7be6d 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -918,8 +918,7 @@ typedef struct ctl_table ctl_table; | |||
918 | 918 | ||
919 | typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, | 919 | typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, |
920 | void __user *oldval, size_t __user *oldlenp, | 920 | void __user *oldval, size_t __user *oldlenp, |
921 | void __user *newval, size_t newlen, | 921 | void __user *newval, size_t newlen); |
922 | void **context); | ||
923 | 922 | ||
924 | typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, | 923 | typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, |
925 | void __user *buffer, size_t *lenp, loff_t *ppos); | 924 | void __user *buffer, size_t *lenp, loff_t *ppos); |
@@ -950,7 +949,7 @@ extern int do_sysctl (int __user *name, int nlen, | |||
950 | extern int do_sysctl_strategy (ctl_table *table, | 949 | extern int do_sysctl_strategy (ctl_table *table, |
951 | int __user *name, int nlen, | 950 | int __user *name, int nlen, |
952 | void __user *oldval, size_t __user *oldlenp, | 951 | void __user *oldval, size_t __user *oldlenp, |
953 | void __user *newval, size_t newlen, void ** context); | 952 | void __user *newval, size_t newlen); |
954 | 953 | ||
955 | extern ctl_handler sysctl_string; | 954 | extern ctl_handler sysctl_string; |
956 | extern ctl_handler sysctl_intvec; | 955 | extern ctl_handler sysctl_intvec; |
diff --git a/include/net/ip.h b/include/net/ip.h index 83cb9ac5554e..053f02b5cb89 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -376,8 +376,7 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write, | |||
376 | size_t *lenp, loff_t *ppos); | 376 | size_t *lenp, loff_t *ppos); |
377 | int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, | 377 | int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, |
378 | void __user *oldval, size_t __user *oldlenp, | 378 | void __user *oldval, size_t __user *oldlenp, |
379 | void __user *newval, size_t newlen, | 379 | void __user *newval, size_t newlen); |
380 | void **context); | ||
381 | #ifdef CONFIG_PROC_FS | 380 | #ifdef CONFIG_PROC_FS |
382 | extern int ip_misc_proc_init(void); | 381 | extern int ip_misc_proc_init(void); |
383 | #endif | 382 | #endif |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 215461f18db1..c818f87122af 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -368,7 +368,7 @@ static inline void sctp_sysctl_register(void) { return; } | |||
368 | static inline void sctp_sysctl_unregister(void) { return; } | 368 | static inline void sctp_sysctl_unregister(void) { return; } |
369 | static inline int sctp_sysctl_jiffies_ms(ctl_table *table, int __user *name, int nlen, | 369 | static inline int sctp_sysctl_jiffies_ms(ctl_table *table, int __user *name, int nlen, |
370 | void __user *oldval, size_t __user *oldlenp, | 370 | void __user *oldval, size_t __user *oldlenp, |
371 | void __user *newval, size_t newlen, void **context) { | 371 | void __user *newval, size_t newlen) { |
372 | return -ENOSYS; | 372 | return -ENOSYS; |
373 | } | 373 | } |
374 | #endif | 374 | #endif |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index c86445a62af2..130c5ec9ee0b 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -133,7 +133,7 @@ extern int max_lock_depth; | |||
133 | 133 | ||
134 | #ifdef CONFIG_SYSCTL_SYSCALL | 134 | #ifdef CONFIG_SYSCTL_SYSCALL |
135 | static int parse_table(int __user *, int, void __user *, size_t __user *, | 135 | static int parse_table(int __user *, int, void __user *, size_t __user *, |
136 | void __user *, size_t, ctl_table *, void **); | 136 | void __user *, size_t, ctl_table *); |
137 | #endif | 137 | #endif |
138 | 138 | ||
139 | static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, | 139 | static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, |
@@ -141,12 +141,12 @@ static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, | |||
141 | 141 | ||
142 | static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, | 142 | static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, |
143 | void __user *oldval, size_t __user *oldlenp, | 143 | void __user *oldval, size_t __user *oldlenp, |
144 | void __user *newval, size_t newlen, void **context); | 144 | void __user *newval, size_t newlen); |
145 | 145 | ||
146 | #ifdef CONFIG_SYSVIPC | 146 | #ifdef CONFIG_SYSVIPC |
147 | static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, | 147 | static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, |
148 | void __user *oldval, size_t __user *oldlenp, | 148 | void __user *oldval, size_t __user *oldlenp, |
149 | void __user *newval, size_t newlen, void **context); | 149 | void __user *newval, size_t newlen); |
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | #ifdef CONFIG_PROC_SYSCTL | 152 | #ifdef CONFIG_PROC_SYSCTL |
@@ -1243,7 +1243,6 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol | |||
1243 | do { | 1243 | do { |
1244 | struct ctl_table_header *head = | 1244 | struct ctl_table_header *head = |
1245 | list_entry(tmp, struct ctl_table_header, ctl_entry); | 1245 | list_entry(tmp, struct ctl_table_header, ctl_entry); |
1246 | void *context = NULL; | ||
1247 | 1246 | ||
1248 | if (!use_table(head)) | 1247 | if (!use_table(head)) |
1249 | continue; | 1248 | continue; |
@@ -1251,9 +1250,7 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol | |||
1251 | spin_unlock(&sysctl_lock); | 1250 | spin_unlock(&sysctl_lock); |
1252 | 1251 | ||
1253 | error = parse_table(name, nlen, oldval, oldlenp, | 1252 | error = parse_table(name, nlen, oldval, oldlenp, |
1254 | newval, newlen, head->ctl_table, | 1253 | newval, newlen, head->ctl_table); |
1255 | &context); | ||
1256 | kfree(context); | ||
1257 | 1254 | ||
1258 | spin_lock(&sysctl_lock); | 1255 | spin_lock(&sysctl_lock); |
1259 | unuse_table(head); | 1256 | unuse_table(head); |
@@ -1309,7 +1306,7 @@ static inline int ctl_perm(ctl_table *table, int op) | |||
1309 | static int parse_table(int __user *name, int nlen, | 1306 | static int parse_table(int __user *name, int nlen, |
1310 | void __user *oldval, size_t __user *oldlenp, | 1307 | void __user *oldval, size_t __user *oldlenp, |
1311 | void __user *newval, size_t newlen, | 1308 | void __user *newval, size_t newlen, |
1312 | ctl_table *table, void **context) | 1309 | ctl_table *table) |
1313 | { | 1310 | { |
1314 | int n; | 1311 | int n; |
1315 | repeat: | 1312 | repeat: |
@@ -1329,7 +1326,7 @@ repeat: | |||
1329 | error = table->strategy( | 1326 | error = table->strategy( |
1330 | table, name, nlen, | 1327 | table, name, nlen, |
1331 | oldval, oldlenp, | 1328 | oldval, oldlenp, |
1332 | newval, newlen, context); | 1329 | newval, newlen); |
1333 | if (error) | 1330 | if (error) |
1334 | return error; | 1331 | return error; |
1335 | } | 1332 | } |
@@ -1340,7 +1337,7 @@ repeat: | |||
1340 | } | 1337 | } |
1341 | error = do_sysctl_strategy(table, name, nlen, | 1338 | error = do_sysctl_strategy(table, name, nlen, |
1342 | oldval, oldlenp, | 1339 | oldval, oldlenp, |
1343 | newval, newlen, context); | 1340 | newval, newlen); |
1344 | return error; | 1341 | return error; |
1345 | } | 1342 | } |
1346 | } | 1343 | } |
@@ -1351,7 +1348,7 @@ repeat: | |||
1351 | int do_sysctl_strategy (ctl_table *table, | 1348 | int do_sysctl_strategy (ctl_table *table, |
1352 | int __user *name, int nlen, | 1349 | int __user *name, int nlen, |
1353 | void __user *oldval, size_t __user *oldlenp, | 1350 | void __user *oldval, size_t __user *oldlenp, |
1354 | void __user *newval, size_t newlen, void **context) | 1351 | void __user *newval, size_t newlen) |
1355 | { | 1352 | { |
1356 | int op = 0, rc; | 1353 | int op = 0, rc; |
1357 | size_t len; | 1354 | size_t len; |
@@ -1365,7 +1362,7 @@ int do_sysctl_strategy (ctl_table *table, | |||
1365 | 1362 | ||
1366 | if (table->strategy) { | 1363 | if (table->strategy) { |
1367 | rc = table->strategy(table, name, nlen, oldval, oldlenp, | 1364 | rc = table->strategy(table, name, nlen, oldval, oldlenp, |
1368 | newval, newlen, context); | 1365 | newval, newlen); |
1369 | if (rc < 0) | 1366 | if (rc < 0) |
1370 | return rc; | 1367 | return rc; |
1371 | if (rc > 0) | 1368 | if (rc > 0) |
@@ -2473,7 +2470,7 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write, | |||
2473 | /* The generic string strategy routine: */ | 2470 | /* The generic string strategy routine: */ |
2474 | int sysctl_string(ctl_table *table, int __user *name, int nlen, | 2471 | int sysctl_string(ctl_table *table, int __user *name, int nlen, |
2475 | void __user *oldval, size_t __user *oldlenp, | 2472 | void __user *oldval, size_t __user *oldlenp, |
2476 | void __user *newval, size_t newlen, void **context) | 2473 | void __user *newval, size_t newlen) |
2477 | { | 2474 | { |
2478 | if (!table->data || !table->maxlen) | 2475 | if (!table->data || !table->maxlen) |
2479 | return -ENOTDIR; | 2476 | return -ENOTDIR; |
@@ -2519,7 +2516,7 @@ int sysctl_string(ctl_table *table, int __user *name, int nlen, | |||
2519 | */ | 2516 | */ |
2520 | int sysctl_intvec(ctl_table *table, int __user *name, int nlen, | 2517 | int sysctl_intvec(ctl_table *table, int __user *name, int nlen, |
2521 | void __user *oldval, size_t __user *oldlenp, | 2518 | void __user *oldval, size_t __user *oldlenp, |
2522 | void __user *newval, size_t newlen, void **context) | 2519 | void __user *newval, size_t newlen) |
2523 | { | 2520 | { |
2524 | 2521 | ||
2525 | if (newval && newlen) { | 2522 | if (newval && newlen) { |
@@ -2555,7 +2552,7 @@ int sysctl_intvec(ctl_table *table, int __user *name, int nlen, | |||
2555 | /* Strategy function to convert jiffies to seconds */ | 2552 | /* Strategy function to convert jiffies to seconds */ |
2556 | int sysctl_jiffies(ctl_table *table, int __user *name, int nlen, | 2553 | int sysctl_jiffies(ctl_table *table, int __user *name, int nlen, |
2557 | void __user *oldval, size_t __user *oldlenp, | 2554 | void __user *oldval, size_t __user *oldlenp, |
2558 | void __user *newval, size_t newlen, void **context) | 2555 | void __user *newval, size_t newlen) |
2559 | { | 2556 | { |
2560 | if (oldval) { | 2557 | if (oldval) { |
2561 | size_t olen; | 2558 | size_t olen; |
@@ -2583,7 +2580,7 @@ int sysctl_jiffies(ctl_table *table, int __user *name, int nlen, | |||
2583 | /* Strategy function to convert jiffies to seconds */ | 2580 | /* Strategy function to convert jiffies to seconds */ |
2584 | int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen, | 2581 | int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen, |
2585 | void __user *oldval, size_t __user *oldlenp, | 2582 | void __user *oldval, size_t __user *oldlenp, |
2586 | void __user *newval, size_t newlen, void **context) | 2583 | void __user *newval, size_t newlen) |
2587 | { | 2584 | { |
2588 | if (oldval) { | 2585 | if (oldval) { |
2589 | size_t olen; | 2586 | size_t olen; |
@@ -2612,7 +2609,7 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen, | |||
2612 | /* The generic string strategy routine: */ | 2609 | /* The generic string strategy routine: */ |
2613 | static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, | 2610 | static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, |
2614 | void __user *oldval, size_t __user *oldlenp, | 2611 | void __user *oldval, size_t __user *oldlenp, |
2615 | void __user *newval, size_t newlen, void **context) | 2612 | void __user *newval, size_t newlen) |
2616 | { | 2613 | { |
2617 | struct ctl_table uts_table; | 2614 | struct ctl_table uts_table; |
2618 | int r, write; | 2615 | int r, write; |
@@ -2620,7 +2617,7 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, | |||
2620 | memcpy(&uts_table, table, sizeof(uts_table)); | 2617 | memcpy(&uts_table, table, sizeof(uts_table)); |
2621 | uts_table.data = get_uts(table, write); | 2618 | uts_table.data = get_uts(table, write); |
2622 | r = sysctl_string(&uts_table, name, nlen, | 2619 | r = sysctl_string(&uts_table, name, nlen, |
2623 | oldval, oldlenp, newval, newlen, context); | 2620 | oldval, oldlenp, newval, newlen); |
2624 | put_uts(table, write, uts_table.data); | 2621 | put_uts(table, write, uts_table.data); |
2625 | return r; | 2622 | return r; |
2626 | } | 2623 | } |
@@ -2629,7 +2626,7 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, | |||
2629 | /* The generic sysctl ipc data routine. */ | 2626 | /* The generic sysctl ipc data routine. */ |
2630 | static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, | 2627 | static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, |
2631 | void __user *oldval, size_t __user *oldlenp, | 2628 | void __user *oldval, size_t __user *oldlenp, |
2632 | void __user *newval, size_t newlen, void **context) | 2629 | void __user *newval, size_t newlen) |
2633 | { | 2630 | { |
2634 | size_t len; | 2631 | size_t len; |
2635 | void *data; | 2632 | void *data; |
@@ -2704,41 +2701,41 @@ out: | |||
2704 | 2701 | ||
2705 | int sysctl_string(ctl_table *table, int __user *name, int nlen, | 2702 | int sysctl_string(ctl_table *table, int __user *name, int nlen, |
2706 | void __user *oldval, size_t __user *oldlenp, | 2703 | void __user *oldval, size_t __user *oldlenp, |
2707 | void __user *newval, size_t newlen, void **context) | 2704 | void __user *newval, size_t newlen) |
2708 | { | 2705 | { |
2709 | return -ENOSYS; | 2706 | return -ENOSYS; |
2710 | } | 2707 | } |
2711 | 2708 | ||
2712 | int sysctl_intvec(ctl_table *table, int __user *name, int nlen, | 2709 | int sysctl_intvec(ctl_table *table, int __user *name, int nlen, |
2713 | void __user *oldval, size_t __user *oldlenp, | 2710 | void __user *oldval, size_t __user *oldlenp, |
2714 | void __user *newval, size_t newlen, void **context) | 2711 | void __user *newval, size_t newlen) |
2715 | { | 2712 | { |
2716 | return -ENOSYS; | 2713 | return -ENOSYS; |
2717 | } | 2714 | } |
2718 | 2715 | ||
2719 | int sysctl_jiffies(ctl_table *table, int __user *name, int nlen, | 2716 | int sysctl_jiffies(ctl_table *table, int __user *name, int nlen, |
2720 | void __user *oldval, size_t __user *oldlenp, | 2717 | void __user *oldval, size_t __user *oldlenp, |
2721 | void __user *newval, size_t newlen, void **context) | 2718 | void __user *newval, size_t newlen) |
2722 | { | 2719 | { |
2723 | return -ENOSYS; | 2720 | return -ENOSYS; |
2724 | } | 2721 | } |
2725 | 2722 | ||
2726 | int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen, | 2723 | int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen, |
2727 | void __user *oldval, size_t __user *oldlenp, | 2724 | void __user *oldval, size_t __user *oldlenp, |
2728 | void __user *newval, size_t newlen, void **context) | 2725 | void __user *newval, size_t newlen) |
2729 | { | 2726 | { |
2730 | return -ENOSYS; | 2727 | return -ENOSYS; |
2731 | } | 2728 | } |
2732 | 2729 | ||
2733 | static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, | 2730 | static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, |
2734 | void __user *oldval, size_t __user *oldlenp, | 2731 | void __user *oldval, size_t __user *oldlenp, |
2735 | void __user *newval, size_t newlen, void **context) | 2732 | void __user *newval, size_t newlen) |
2736 | { | 2733 | { |
2737 | return -ENOSYS; | 2734 | return -ENOSYS; |
2738 | } | 2735 | } |
2739 | static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, | 2736 | static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, |
2740 | void __user *oldval, size_t __user *oldlenp, | 2737 | void __user *oldval, size_t __user *oldlenp, |
2741 | void __user *newval, size_t newlen, void **context) | 2738 | void __user *newval, size_t newlen) |
2742 | { | 2739 | { |
2743 | return -ENOSYS; | 2740 | return -ENOSYS; |
2744 | } | 2741 | } |
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 0b9d4c955154..fc6f3c023a54 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -167,8 +167,7 @@ static int dn_forwarding_proc(ctl_table *, int, struct file *, | |||
167 | void __user *, size_t *, loff_t *); | 167 | void __user *, size_t *, loff_t *); |
168 | static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen, | 168 | static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen, |
169 | void __user *oldval, size_t __user *oldlenp, | 169 | void __user *oldval, size_t __user *oldlenp, |
170 | void __user *newval, size_t newlen, | 170 | void __user *newval, size_t newlen); |
171 | void **context); | ||
172 | 171 | ||
173 | static struct dn_dev_sysctl_table { | 172 | static struct dn_dev_sysctl_table { |
174 | struct ctl_table_header *sysctl_header; | 173 | struct ctl_table_header *sysctl_header; |
@@ -347,8 +346,7 @@ static int dn_forwarding_proc(ctl_table *table, int write, | |||
347 | 346 | ||
348 | static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen, | 347 | static int dn_forwarding_sysctl(ctl_table *table, int __user *name, int nlen, |
349 | void __user *oldval, size_t __user *oldlenp, | 348 | void __user *oldval, size_t __user *oldlenp, |
350 | void __user *newval, size_t newlen, | 349 | void __user *newval, size_t newlen) |
351 | void **context) | ||
352 | { | 350 | { |
353 | #ifdef CONFIG_DECNET_ROUTER | 351 | #ifdef CONFIG_DECNET_ROUTER |
354 | struct net_device *dev = table->extra1; | 352 | struct net_device *dev = table->extra1; |
diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c index e246f054f368..a4065eb1341e 100644 --- a/net/decnet/sysctl_net_decnet.c +++ b/net/decnet/sysctl_net_decnet.c | |||
@@ -134,8 +134,7 @@ static int parse_addr(__le16 *addr, char *str) | |||
134 | 134 | ||
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, int __user *name, int nlen, |
136 | void __user *oldval, size_t __user *oldlenp, | 136 | void __user *oldval, size_t __user *oldlenp, |
137 | void __user *newval, size_t newlen, | 137 | void __user *newval, size_t newlen) |
138 | void **context) | ||
139 | { | 138 | { |
140 | size_t len; | 139 | size_t len; |
141 | __le16 addr; | 140 | __le16 addr; |
@@ -220,8 +219,7 @@ static int dn_node_address_handler(ctl_table *table, int write, | |||
220 | 219 | ||
221 | static int dn_def_dev_strategy(ctl_table *table, int __user *name, int nlen, | 220 | static int dn_def_dev_strategy(ctl_table *table, int __user *name, int nlen, |
222 | void __user *oldval, size_t __user *oldlenp, | 221 | void __user *oldval, size_t __user *oldlenp, |
223 | void __user *newval, size_t newlen, | 222 | void __user *newval, size_t newlen) |
224 | void **context) | ||
225 | { | 223 | { |
226 | size_t len; | 224 | size_t len; |
227 | struct net_device *dev; | 225 | struct net_device *dev; |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 2fd899160f85..84bed40273ad 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -1303,8 +1303,7 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write, | |||
1303 | 1303 | ||
1304 | int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, | 1304 | int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, |
1305 | void __user *oldval, size_t __user *oldlenp, | 1305 | void __user *oldval, size_t __user *oldlenp, |
1306 | void __user *newval, size_t newlen, | 1306 | void __user *newval, size_t newlen) |
1307 | void **context) | ||
1308 | { | 1307 | { |
1309 | int *valp = table->data; | 1308 | int *valp = table->data; |
1310 | int new; | 1309 | int new; |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 11c167118e87..1aaff0a2e098 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2872,8 +2872,7 @@ static int ipv4_sysctl_rtcache_flush_strategy(ctl_table *table, | |||
2872 | void __user *oldval, | 2872 | void __user *oldval, |
2873 | size_t __user *oldlenp, | 2873 | size_t __user *oldlenp, |
2874 | void __user *newval, | 2874 | void __user *newval, |
2875 | size_t newlen, | 2875 | size_t newlen) |
2876 | void **context) | ||
2877 | { | 2876 | { |
2878 | int delay; | 2877 | int delay; |
2879 | if (newlen != sizeof(int)) | 2878 | if (newlen != sizeof(int)) |
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index dfcf47f10f88..fabf69a9108c 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c | |||
@@ -51,8 +51,7 @@ int ipv4_sysctl_forward(ctl_table *ctl, int write, struct file * filp, | |||
51 | static int ipv4_sysctl_forward_strategy(ctl_table *table, | 51 | static int ipv4_sysctl_forward_strategy(ctl_table *table, |
52 | int __user *name, int nlen, | 52 | int __user *name, int nlen, |
53 | void __user *oldval, size_t __user *oldlenp, | 53 | void __user *oldval, size_t __user *oldlenp, |
54 | void __user *newval, size_t newlen, | 54 | void __user *newval, size_t newlen) |
55 | void **context) | ||
56 | { | 55 | { |
57 | int *valp = table->data; | 56 | int *valp = table->data; |
58 | int new; | 57 | int new; |
@@ -111,8 +110,7 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * | |||
111 | static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, | 110 | static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, |
112 | int nlen, void __user *oldval, | 111 | int nlen, void __user *oldval, |
113 | size_t __user *oldlenp, | 112 | size_t __user *oldlenp, |
114 | void __user *newval, size_t newlen, | 113 | void __user *newval, size_t newlen) |
115 | void **context) | ||
116 | { | 114 | { |
117 | char val[TCP_CA_NAME_MAX]; | 115 | char val[TCP_CA_NAME_MAX]; |
118 | ctl_table tbl = { | 116 | ctl_table tbl = { |
@@ -122,8 +120,7 @@ static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, | |||
122 | int ret; | 120 | int ret; |
123 | 121 | ||
124 | tcp_get_default_congestion_control(val); | 122 | tcp_get_default_congestion_control(val); |
125 | ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen, | 123 | ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen); |
126 | context); | ||
127 | if (ret == 0 && newval && newlen) | 124 | if (ret == 0 && newval && newlen) |
128 | ret = tcp_set_default_congestion_control(val); | 125 | ret = tcp_set_default_congestion_control(val); |
129 | return ret; | 126 | return ret; |
@@ -169,8 +166,8 @@ static int proc_allowed_congestion_control(ctl_table *ctl, | |||
169 | static int strategy_allowed_congestion_control(ctl_table *table, int __user *name, | 166 | static int strategy_allowed_congestion_control(ctl_table *table, int __user *name, |
170 | int nlen, void __user *oldval, | 167 | int nlen, void __user *oldval, |
171 | size_t __user *oldlenp, | 168 | size_t __user *oldlenp, |
172 | void __user *newval, size_t newlen, | 169 | void __user *newval, |
173 | void **context) | 170 | size_t newlen) |
174 | { | 171 | { |
175 | ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX }; | 172 | ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX }; |
176 | int ret; | 173 | int ret; |
@@ -180,8 +177,7 @@ static int strategy_allowed_congestion_control(ctl_table *table, int __user *nam | |||
180 | return -ENOMEM; | 177 | return -ENOMEM; |
181 | 178 | ||
182 | tcp_get_available_congestion_control(tbl.data, tbl.maxlen); | 179 | tcp_get_available_congestion_control(tbl.data, tbl.maxlen); |
183 | ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen, | 180 | ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen); |
184 | context); | ||
185 | if (ret == 0 && newval && newlen) | 181 | if (ret == 0 && newval && newlen) |
186 | ret = tcp_set_allowed_congestion_control(tbl.data); | 182 | ret = tcp_set_allowed_congestion_control(tbl.data); |
187 | kfree(tbl.data); | 183 | kfree(tbl.data); |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a5e8d207a51b..9b0a90643151 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3656,8 +3656,7 @@ static int addrconf_sysctl_forward_strategy(ctl_table *table, | |||
3656 | int __user *name, int nlen, | 3656 | int __user *name, int nlen, |
3657 | void __user *oldval, | 3657 | void __user *oldval, |
3658 | size_t __user *oldlenp, | 3658 | size_t __user *oldlenp, |
3659 | void __user *newval, size_t newlen, | 3659 | void __user *newval, size_t newlen) |
3660 | void **context) | ||
3661 | { | 3660 | { |
3662 | int *valp = table->data; | 3661 | int *valp = table->data; |
3663 | int new; | 3662 | int new; |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 56ea92837307..6a9f616de37d 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1667,8 +1667,7 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f | |||
1667 | static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | 1667 | static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, |
1668 | int nlen, void __user *oldval, | 1668 | int nlen, void __user *oldval, |
1669 | size_t __user *oldlenp, | 1669 | size_t __user *oldlenp, |
1670 | void __user *newval, size_t newlen, | 1670 | void __user *newval, size_t newlen) |
1671 | void **context) | ||
1672 | { | 1671 | { |
1673 | struct net_device *dev = ctl->extra1; | 1672 | struct net_device *dev = ctl->extra1; |
1674 | struct inet6_dev *idev; | 1673 | struct inet6_dev *idev; |
@@ -1681,14 +1680,12 @@ static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | |||
1681 | switch (ctl->ctl_name) { | 1680 | switch (ctl->ctl_name) { |
1682 | case NET_NEIGH_REACHABLE_TIME: | 1681 | case NET_NEIGH_REACHABLE_TIME: |
1683 | ret = sysctl_jiffies(ctl, name, nlen, | 1682 | ret = sysctl_jiffies(ctl, name, nlen, |
1684 | oldval, oldlenp, newval, newlen, | 1683 | oldval, oldlenp, newval, newlen); |
1685 | context); | ||
1686 | break; | 1684 | break; |
1687 | case NET_NEIGH_RETRANS_TIME_MS: | 1685 | case NET_NEIGH_RETRANS_TIME_MS: |
1688 | case NET_NEIGH_REACHABLE_TIME_MS: | 1686 | case NET_NEIGH_REACHABLE_TIME_MS: |
1689 | ret = sysctl_ms_jiffies(ctl, name, nlen, | 1687 | ret = sysctl_ms_jiffies(ctl, name, nlen, |
1690 | oldval, oldlenp, newval, newlen, | 1688 | oldval, oldlenp, newval, newlen); |
1691 | context); | ||
1692 | break; | 1689 | break; |
1693 | default: | 1690 | default: |
1694 | ret = 0; | 1691 | ret = 0; |