History

sysctl: remove "struct file *" argument of ->proc_handler

It's unused. It isn't needed -- read or write flag is already passed and sysctl shouldn't care about the rest. It _was_ used in two places at arch/frv for some reason.

Alexey Dobriyan committed 17 years ago

Commit 8d65af71 parent c0d078760 files · +239 −270Browse files

Unified · Split

60 files
  1. arch/frv/kernel/pm.c +7 −7
  2. arch/mips/lasat/sysctl.c +9 −9
  3. arch/s390/appldata/appldata_base.c +4 −5
  4. arch/s390/kernel/debug.c +2 −2
  5. arch/s390/mm/cmm.c +2 −2
  6. arch/x86/include/asm/nmi.h +1 −2
  7. arch/x86/kernel/apic/nmi.c +2 −2
  8. arch/x86/kernel/vsyscall_64.c +1 −9
  9. drivers/cdrom/cdrom.c +4 −4
  10. drivers/char/random.c +2 −2
  11. drivers/net/wireless/arlan-proc.c +14 −14
  12. drivers/parport/procfs.c +6 −6
  13. fs/coda/coda_int.h +1 −0
  14. fs/drop_caches.c +2 −2
  15. fs/file_table.c +3 −3
  16. fs/proc/proc_sysctl.c +1 −1
  17. fs/xfs/linux-2.6/xfs_sysctl.c +1 −2
  18. include/linux/fs.h +1 −1
  19. include/linux/ftrace.h +2 −2
  20. include/linux/hugetlb.h +3 −3
  21. include/linux/mm.h +1 −1
  22. include/linux/mmzone.h +6 −7
  23. include/linux/sched.h +4 −4
  24. include/linux/security.h +1 −1
  25. include/linux/swap.h +1 −1
  26. include/linux/sysctl.h +9 −10
  27. include/linux/writeback.h +5 −6
  28. include/net/ip.h +1 −1
  29. include/net/ndisc.h +0 −2
  30. ipc/ipc_sysctl.c +8 −8
  31. ipc/mq_sysctl.c +4 −4
  32. kernel/hung_task.c +2 −2
  33. kernel/sched.c +2 −2
  34. kernel/sched_fair.c +2 −2
  35. kernel/slow-work.c +6 −6
  36. kernel/softlockup.c +2 −2
  37. kernel/sysctl.c +33 −45
  38. kernel/trace/ftrace.c +2 −2
  39. kernel/trace/trace_stack.c +2 −2
  40. kernel/utsname_sysctl.c +2 −2
  41. mm/hugetlb.c +6 −6
  42. mm/page-writeback.c +10 −10
  43. mm/page_alloc.c +12 −12
  44. mm/vmscan.c +2 −2
  45. net/bridge/br_netfilter.c +2 −2
  46. net/decnet/dn_dev.c +2 −3
  47. net/decnet/sysctl_net_decnet.c +0 −2
  48. net/ipv4/devinet.c +6 −6
  49. net/ipv4/route.c +3 −4
  50. net/ipv4/sysctl_net_ipv4.c +8 −8
  51. net/ipv6/addrconf.c +4 −4
  52. net/ipv6/ndisc.c +4 −4
  53. net/ipv6/route.c +2 −2
  54. net/irda/irsysctl.c +4 −4
  55. net/netfilter/ipvs/ip_vs_ctl.c +4 −4
  56. net/netfilter/nf_log.c +2 −2
  57. net/phonet/sysctl.c +2 −2
  58. net/sunrpc/sysctl.c +2 −2
  59. net/sunrpc/xprtrdma/svc_rdma.c +1 −1
  60. security/min_addr.c +2 −2
arch/frv/kernel/pm.c+7−7
@@ -150,7 +150,7 @@ static int user_atoi(char __user *ubuf, size_t len) · 149 unmodified lines
150/*150/*
151 * Send us to sleep.151 * Send us to sleep.
152 */152 */
153static int sysctl_pm_do_suspend(ctl_table *ctl, int write, struct file *filp,153static int sysctl_pm_do_suspend(ctl_table *ctl, int write,
154 void __user *buffer, size_t *lenp, loff_t *fpos)154 void __user *buffer, size_t *lenp, loff_t *fpos)
155{155{
156 int retval, mode;156 int retval, mode;
@@ -198,13 +198,13 @@ static int try_set_cmode(int new_cmode) · 41 unmodified lines
198}198}
199 199
200 200
201static int cmode_procctl(ctl_table *ctl, int write, struct file *filp,201static int cmode_procctl(ctl_table *ctl, int write,
202 void __user *buffer, size_t *lenp, loff_t *fpos)202 void __user *buffer, size_t *lenp, loff_t *fpos)
203{203{
204 int new_cmode;204 int new_cmode;
205 205
206 if (!write)206 if (!write)
207 return proc_dointvec(ctl, write, filp, buffer, lenp, fpos);207 return proc_dointvec(ctl, write, buffer, lenp, fpos);
208 208
209 new_cmode = user_atoi(buffer, *lenp);209 new_cmode = user_atoi(buffer, *lenp);
210 210
@@ -301,13 +301,13 @@ static int try_set_cm(int new_cm) · 90 unmodified lines
301 return 0;301 return 0;
302}302}
303 303
304static int p0_procctl(ctl_table *ctl, int write, struct file *filp,304static int p0_procctl(ctl_table *ctl, int write,
305 void __user *buffer, size_t *lenp, loff_t *fpos)305 void __user *buffer, size_t *lenp, loff_t *fpos)
306{306{
307 int new_p0;307 int new_p0;
308 308
309 if (!write)309 if (!write)
310 return proc_dointvec(ctl, write, filp, buffer, lenp, fpos);310 return proc_dointvec(ctl, write, buffer, lenp, fpos);
311 311
312 new_p0 = user_atoi(buffer, *lenp);312 new_p0 = user_atoi(buffer, *lenp);
313 313
@@ -345,13 +345,13 @@ static int p0_sysctl(ctl_table *table, · 31 unmodified lines
345 return 1;345 return 1;
346}346}
347 347
348static int cm_procctl(ctl_table *ctl, int write, struct file *filp,348static int cm_procctl(ctl_table *ctl, int write,
349 void __user *buffer, size_t *lenp, loff_t *fpos)349 void __user *buffer, size_t *lenp, loff_t *fpos)
350{350{
351 int new_cm;351 int new_cm;
352 352
353 if (!write)353 if (!write)
354 return proc_dointvec(ctl, write, filp, buffer, lenp, fpos);354 return proc_dointvec(ctl, write, buffer, lenp, fpos);
355 355
356 new_cm = user_atoi(buffer, *lenp);356 new_cm = user_atoi(buffer, *lenp);
357 357
arch/mips/lasat/sysctl.c+9−9
@@ -56,12 +56,12 @@ int sysctl_lasatstring(ctl_table *table, · 55 unmodified lines
56 56
57 57
58/* And the same for proc */58/* And the same for proc */
59int proc_dolasatstring(ctl_table *table, int write, struct file *filp,59int proc_dolasatstring(ctl_table *table, int write,
60 void *buffer, size_t *lenp, loff_t *ppos)60 void *buffer, size_t *lenp, loff_t *ppos)
61{61{
62 int r;62 int r;
63 63
64 r = proc_dostring(table, write, filp, buffer, lenp, ppos);64 r = proc_dostring(table, write, buffer, lenp, ppos);
65 if ((!write) || r)65 if ((!write) || r)
66 return r;66 return r;
67 67
@@ -71,12 +71,12 @@ int proc_dolasatstring(ctl_table *table, int write, struct file *filp, · 3 unmodified lines
71}71}
72 72
73/* proc function to write EEPROM after changing int entry */73/* proc function to write EEPROM after changing int entry */
74int proc_dolasatint(ctl_table *table, int write, struct file *filp,74int proc_dolasatint(ctl_table *table, int write,
75 void *buffer, size_t *lenp, loff_t *ppos)75 void *buffer, size_t *lenp, loff_t *ppos)
76{76{
77 int r;77 int r;
78 78
79 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);79 r = proc_dointvec(table, write, buffer, lenp, ppos);
80 if ((!write) || r)80 if ((!write) || r)
81 return r;81 return r;
82 82
@@ -89,7 +89,7 @@ int proc_dolasatint(ctl_table *table, int write, struct file *filp, · 6 unmodified lines
89static int rtctmp;89static int rtctmp;
90 90
91/* proc function to read/write RealTime Clock */91/* proc function to read/write RealTime Clock */
92int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,92int proc_dolasatrtc(ctl_table *table, int write,
93 void *buffer, size_t *lenp, loff_t *ppos)93 void *buffer, size_t *lenp, loff_t *ppos)
94{94{
95 struct timespec ts;95 struct timespec ts;
@@ -102,7 +102,7 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, · 6 unmodified lines
102 if (rtctmp < 0)102 if (rtctmp < 0)
103 rtctmp = 0;103 rtctmp = 0;
104 }104 }
105 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);105 r = proc_dointvec(table, write, buffer, lenp, ppos);
106 if (r)106 if (r)
107 return r;107 return r;
108 108
@@ -154,7 +154,7 @@ int sysctl_lasat_rtc(ctl_table *table, · 45 unmodified lines
154#endif154#endif
155 155
156#ifdef CONFIG_INET156#ifdef CONFIG_INET
157int proc_lasat_ip(ctl_table *table, int write, struct file *filp,157int proc_lasat_ip(ctl_table *table, int write,
158 void *buffer, size_t *lenp, loff_t *ppos)158 void *buffer, size_t *lenp, loff_t *ppos)
159{159{
160 unsigned int ip;160 unsigned int ip;
@@ -231,12 +231,12 @@ static int sysctl_lasat_prid(ctl_table *table, · 70 unmodified lines
231 return 0;231 return 0;
232}232}
233 233
234int proc_lasat_prid(ctl_table *table, int write, struct file *filp,234int proc_lasat_prid(ctl_table *table, int write,
235 void *buffer, size_t *lenp, loff_t *ppos)235 void *buffer, size_t *lenp, loff_t *ppos)
236{236{
237 int r;237 int r;
238 238
239 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);239 r = proc_dointvec(table, write, buffer, lenp, ppos);
240 if (r < 0)240 if (r < 0)
241 return r;241 return r;
242 if (write) {242 if (write) {
arch/s390/appldata/appldata_base.c+4−5
@@ -50,10 +50,9 @@ static struct platform_device *appldata_pdev; · 49 unmodified lines
50 * /proc entries (sysctl)50 * /proc entries (sysctl)
51 */51 */
52static const char appldata_proc_name[APPLDATA_PROC_NAME_LENGTH] = "appldata";52static const char appldata_proc_name[APPLDATA_PROC_NAME_LENGTH] = "appldata";
53static int appldata_timer_handler(ctl_table *ctl, int write, struct file *filp,53static int appldata_timer_handler(ctl_table *ctl, int write,
54 void __user *buffer, size_t *lenp, loff_t *ppos);54 void __user *buffer, size_t *lenp, loff_t *ppos);
55static int appldata_interval_handler(ctl_table *ctl, int write,55static int appldata_interval_handler(ctl_table *ctl, int write,
56 struct file *filp,
57 void __user *buffer,56 void __user *buffer,
58 size_t *lenp, loff_t *ppos);57 size_t *lenp, loff_t *ppos);
59 58
@@ -247,7 +246,7 @@ __appldata_vtimer_setup(int cmd) · 187 unmodified lines
247 * Start/Stop timer, show status of timer (0 = not active, 1 = active)246 * Start/Stop timer, show status of timer (0 = not active, 1 = active)
248 */247 */
249static int248static int
250appldata_timer_handler(ctl_table *ctl, int write, struct file *filp,249appldata_timer_handler(ctl_table *ctl, int write,
251 void __user *buffer, size_t *lenp, loff_t *ppos)250 void __user *buffer, size_t *lenp, loff_t *ppos)
252{251{
253 int len;252 int len;
@@ -289,7 +288,7 @@ out: · 35 unmodified lines
289 * current timer interval.288 * current timer interval.
290 */289 */
291static int290static int
292appldata_interval_handler(ctl_table *ctl, int write, struct file *filp,291appldata_interval_handler(ctl_table *ctl, int write,
293 void __user *buffer, size_t *lenp, loff_t *ppos)292 void __user *buffer, size_t *lenp, loff_t *ppos)
294{293{
295 int len, interval;294 int len, interval;
@@ -335,7 +334,7 @@ out: · 39 unmodified lines
335 * monitoring (0 = not in process, 1 = in process)334 * monitoring (0 = not in process, 1 = in process)
336 */335 */
337static int336static int
338appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,337appldata_generic_handler(ctl_table *ctl, int write,
339 void __user *buffer, size_t *lenp, loff_t *ppos)338 void __user *buffer, size_t *lenp, loff_t *ppos)
340{339{
341 struct appldata_ops *ops = NULL, *tmp_ops;340 struct appldata_ops *ops = NULL, *tmp_ops;
arch/s390/kernel/debug.c+2−2
@@ -881,11 +881,11 @@ static int debug_active=1; · 880 unmodified lines
881 * if debug_active is already off881 * if debug_active is already off
882 */882 */
883static int883static int
884s390dbf_procactive(ctl_table *table, int write, struct file *filp,884s390dbf_procactive(ctl_table *table, int write,
885 void __user *buffer, size_t *lenp, loff_t *ppos)885 void __user *buffer, size_t *lenp, loff_t *ppos)
886{886{
887 if (!write || debug_stoppable || !debug_active)887 if (!write || debug_stoppable || !debug_active)
888 return proc_dointvec(table, write, filp, buffer, lenp, ppos);888 return proc_dointvec(table, write, buffer, lenp, ppos);
889 else889 else
890 return 0;890 return 0;
891}891}
arch/s390/mm/cmm.c+2−2
@@ -262,7 +262,7 @@ cmm_skip_blanks(char *cp, char **endp) · 261 unmodified lines
262static struct ctl_table cmm_table[];262static struct ctl_table cmm_table[];
263 263
264static int264static int
265cmm_pages_handler(ctl_table *ctl, int write, struct file *filp,265cmm_pages_handler(ctl_table *ctl, int write,
266 void __user *buffer, size_t *lenp, loff_t *ppos)266 void __user *buffer, size_t *lenp, loff_t *ppos)
267{267{
268 char buf[16], *p;268 char buf[16], *p;
@@ -303,7 +303,7 @@ cmm_pages_handler(ctl_table *ctl, int write, struct file *filp, · 34 unmodified lines
303}303}
304 304
305static int305static int
306cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp,306cmm_timeout_handler(ctl_table *ctl, int write,
307 void __user *buffer, size_t *lenp, loff_t *ppos)307 void __user *buffer, size_t *lenp, loff_t *ppos)
308{308{
309 char buf[64], *p;309 char buf[64], *p;
arch/x86/include/asm/nmi.h+1−2
@@ -40,8 +40,7 @@ extern unsigned int nmi_watchdog; · 39 unmodified lines
40#define NMI_INVALID 340#define NMI_INVALID 3
41 41
42struct ctl_table;42struct ctl_table;
43struct file;43extern int proc_nmi_enabled(struct ctl_table *, int ,
44extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
45 void __user *, size_t *, loff_t *);44 void __user *, size_t *, loff_t *);
46extern int unknown_nmi_panic;45extern int unknown_nmi_panic;
47 46
arch/x86/kernel/apic/nmi.c+2−2
@@ -508,14 +508,14 @@ static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) · 507 unmodified lines
508/*508/*
509 * proc handler for /proc/sys/kernel/nmi509 * proc handler for /proc/sys/kernel/nmi
510 */510 */
511int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file,511int proc_nmi_enabled(struct ctl_table *table, int write,
512 void __user *buffer, size_t *length, loff_t *ppos)512 void __user *buffer, size_t *length, loff_t *ppos)
513{513{
514 int old_state;514 int old_state;
515 515
516 nmi_watchdog_enabled = (atomic_read(&nmi_active) > 0) ? 1 : 0;516 nmi_watchdog_enabled = (atomic_read(&nmi_active) > 0) ? 1 : 0;
517 old_state = nmi_watchdog_enabled;517 old_state = nmi_watchdog_enabled;
518 proc_dointvec(table, write, file, buffer, length, ppos);518 proc_dointvec(table, write, buffer, length, ppos);
519 if (!!old_state == !!nmi_watchdog_enabled)519 if (!!old_state == !!nmi_watchdog_enabled)
520 return 0;520 return 0;
521 521
arch/x86/kernel/vsyscall_64.c+1−9
@@ -228,19 +228,11 @@ static long __vsyscall(3) venosys_1(void) · 227 unmodified lines
228}228}
229 229
230#ifdef CONFIG_SYSCTL230#ifdef CONFIG_SYSCTL
231
232static int
233vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp,
234 void __user *buffer, size_t *lenp, loff_t *ppos)
235{
236 return proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
237}
238
239static ctl_table kernel_table2[] = {231static ctl_table kernel_table2[] = {
240 { .procname = "vsyscall64",232 { .procname = "vsyscall64",
241 .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int),233 .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int),
242 .mode = 0644,234 .mode = 0644,
243 .proc_handler = vsyscall_sysctl_change },235 .proc_handler = proc_dointvec },
244 {}236 {}
245};237};
246 238
drivers/cdrom/cdrom.c+4−4
@@ -3412,7 +3412,7 @@ static int cdrom_print_info(const char *header, int val, char *info, · 3411 unmodified lines
3412 return 0;3412 return 0;
3413}3413}
3414 3414
3415static int cdrom_sysctl_info(ctl_table *ctl, int write, struct file * filp,3415static int cdrom_sysctl_info(ctl_table *ctl, int write,
3416 void __user *buffer, size_t *lenp, loff_t *ppos)3416 void __user *buffer, size_t *lenp, loff_t *ppos)
3417{3417{
3418 int pos;3418 int pos;
@@ -3489,7 +3489,7 @@ static int cdrom_sysctl_info(ctl_table *ctl, int write, struct file * filp, · 70 unmodified lines
3489 goto done;3489 goto done;
3490doit:3490doit:
3491 mutex_unlock(&cdrom_mutex);3491 mutex_unlock(&cdrom_mutex);
3492 return proc_dostring(ctl, write, filp, buffer, lenp, ppos);3492 return proc_dostring(ctl, write, buffer, lenp, ppos);
3493done:3493done:
3494 printk(KERN_INFO "cdrom: info buffer too small\n");3494 printk(KERN_INFO "cdrom: info buffer too small\n");
3495 goto doit;3495 goto doit;
@@ -3525,12 +3525,12 @@ static void cdrom_update_settings(void) · 29 unmodified lines
3525 mutex_unlock(&cdrom_mutex);3525 mutex_unlock(&cdrom_mutex);
3526}3526}
3527 3527
3528static int cdrom_sysctl_handler(ctl_table *ctl, int write, struct file * filp,3528static int cdrom_sysctl_handler(ctl_table *ctl, int write,
3529 void __user *buffer, size_t *lenp, loff_t *ppos)3529 void __user *buffer, size_t *lenp, loff_t *ppos)
3530{3530{
3531 int ret;3531 int ret;
3532 3532
3533 ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);3533 ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
3534 3534
3535 if (write) {3535 if (write) {
3536 3536
drivers/char/random.c+2−2
@@ -1231,7 +1231,7 @@ static char sysctl_bootid[16]; · 1230 unmodified lines
1231 * as an ASCII string in the standard UUID format. If accesses via the1231 * as an ASCII string in the standard UUID format. If accesses via the
1232 * sysctl system call, it is returned as 16 bytes of binary data.1232 * sysctl system call, it is returned as 16 bytes of binary data.
1233 */1233 */
1234static int proc_do_uuid(ctl_table *table, int write, struct file *filp,1234static int proc_do_uuid(ctl_table *table, int write,
1235 void __user *buffer, size_t *lenp, loff_t *ppos)1235 void __user *buffer, size_t *lenp, loff_t *ppos)
1236{1236{
1237 ctl_table fake_table;1237 ctl_table fake_table;
@@ -1254,7 +1254,7 @@ static int proc_do_uuid(ctl_table *table, int write, struct file *filp, · 16 unmodified lines
1254 fake_table.data = buf;1254 fake_table.data = buf;
1255 fake_table.maxlen = sizeof(buf);1255 fake_table.maxlen = sizeof(buf);
1256 1256
1257 return proc_dostring(&fake_table, write, filp, buffer, lenp, ppos);1257 return proc_dostring(&fake_table, write, buffer, lenp, ppos);
1258}1258}
1259 1259
1260static int uuid_strategy(ctl_table *table,1260static int uuid_strategy(ctl_table *table,
drivers/net/wireless/arlan-proc.c+14−14
@@ -402,7 +402,7 @@ static int arlan_setup_card_by_book(struct net_device *dev) · 401 unmodified lines
402 402
403static char arlan_drive_info[ARLAN_STR_SIZE] = "A655\n\0";403static char arlan_drive_info[ARLAN_STR_SIZE] = "A655\n\0";
404 404
405static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp,405static int arlan_sysctl_info(ctl_table * ctl, int write,
406 void __user *buffer, size_t * lenp, loff_t *ppos)406 void __user *buffer, size_t * lenp, loff_t *ppos)
407{407{
408 int i;408 int i;
@@ -629,7 +629,7 @@ final: · 220 unmodified lines
629 *lenp = pos;629 *lenp = pos;
630 630
631 if (!write)631 if (!write)
632 retv = proc_dostring(ctl, write, filp, buffer, lenp, ppos);632 retv = proc_dostring(ctl, write, buffer, lenp, ppos);
633 else633 else
634 {634 {
635 *lenp = 0;635 *lenp = 0;
@@ -639,7 +639,7 @@ final: · 3 unmodified lines
639}639}
640 640
641 641
642static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp,642static int arlan_sysctl_info161719(ctl_table * ctl, int write,
643 void __user *buffer, size_t * lenp, loff_t *ppos)643 void __user *buffer, size_t * lenp, loff_t *ppos)
644{644{
645 int i;645 int i;
@@ -669,11 +669,11 @@ static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp · 23 unmodified lines
669 669
670final:670final:
671 *lenp = pos;671 *lenp = pos;
672 retv = proc_dostring(ctl, write, filp, buffer, lenp, ppos);672 retv = proc_dostring(ctl, write, buffer, lenp, ppos);
673 return retv;673 return retv;
674}674}
675 675
676static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp,676static int arlan_sysctl_infotxRing(ctl_table * ctl, int write,
677 void __user *buffer, size_t * lenp, loff_t *ppos)677 void __user *buffer, size_t * lenp, loff_t *ppos)
678{678{
679 int i;679 int i;
@@ -698,11 +698,11 @@ static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp · 18 unmodified lines
698 SARLBNpln(u_char, txBuffer, 0x800);698 SARLBNpln(u_char, txBuffer, 0x800);
699final:699final:
700 *lenp = pos;700 *lenp = pos;
701 retv = proc_dostring(ctl, write, filp, buffer, lenp, ppos);701 retv = proc_dostring(ctl, write, buffer, lenp, ppos);
702 return retv;702 return retv;
703}703}
704 704
705static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp,705static int arlan_sysctl_inforxRing(ctl_table * ctl, int write,
706 void __user *buffer, size_t * lenp, loff_t *ppos)706 void __user *buffer, size_t * lenp, loff_t *ppos)
707{707{
708 int i;708 int i;
@@ -726,11 +726,11 @@ static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp · 17 unmodified lines
726 SARLBNpln(u_char, rxBuffer, 0x800);726 SARLBNpln(u_char, rxBuffer, 0x800);
727final:727final:
728 *lenp = pos;728 *lenp = pos;
729 retv = proc_dostring(ctl, write, filp, buffer, lenp, ppos);729 retv = proc_dostring(ctl, write, buffer, lenp, ppos);
730 return retv;730 return retv;
731}731}
732 732
733static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp,733static int arlan_sysctl_info18(ctl_table * ctl, int write,
734 void __user *buffer, size_t * lenp, loff_t *ppos)734 void __user *buffer, size_t * lenp, loff_t *ppos)
735{735{
736 int i;736 int i;
@@ -756,7 +756,7 @@ static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp, · 19 unmodified lines
756 756
757final:757final:
758 *lenp = pos;758 *lenp = pos;
759 retv = proc_dostring(ctl, write, filp, buffer, lenp, ppos);759 retv = proc_dostring(ctl, write, buffer, lenp, ppos);
760 return retv;760 return retv;
761}761}
762 762
@@ -766,7 +766,7 @@ final: · 3 unmodified lines
766 766
767static char conf_reset_result[200];767static char conf_reset_result[200];
768 768
769static int arlan_configure(ctl_table * ctl, int write, struct file *filp,769static int arlan_configure(ctl_table * ctl, int write,
770 void __user *buffer, size_t * lenp, loff_t *ppos)770 void __user *buffer, size_t * lenp, loff_t *ppos)
771{771{
772 int pos = 0;772 int pos = 0;
@@ -788,10 +788,10 @@ static int arlan_configure(ctl_table * ctl, int write, struct file *filp, · 15 unmodified lines
788 return -1;788 return -1;
789 789
790 *lenp = pos;790 *lenp = pos;
791 return proc_dostring(ctl, write, filp, buffer, lenp, ppos);791 return proc_dostring(ctl, write, buffer, lenp, ppos);
792}792}
793 793
794static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp,794static int arlan_sysctl_reset(ctl_table * ctl, int write,
795 void __user *buffer, size_t * lenp, loff_t *ppos)795 void __user *buffer, size_t * lenp, loff_t *ppos)
796{796{
797 int pos = 0;797 int pos = 0;
@@ -811,7 +811,7 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp, · 13 unmodified lines
811 } else811 } else
812 return -1;812 return -1;
813 *lenp = pos + 3;813 *lenp = pos + 3;
814 return proc_dostring(ctl, write, filp, buffer, lenp, ppos);814 return proc_dostring(ctl, write, buffer, lenp, ppos);
815}815}
816 816
817 817
drivers/parport/procfs.c+6−6
@@ -31,7 +31,7 @@ · 30 unmodified lines
31#define PARPORT_MIN_SPINTIME_VALUE 131#define PARPORT_MIN_SPINTIME_VALUE 1
32#define PARPORT_MAX_SPINTIME_VALUE 100032#define PARPORT_MAX_SPINTIME_VALUE 1000
33 33
34static int do_active_device(ctl_table *table, int write, struct file *filp,34static int do_active_device(ctl_table *table, int write,
35 void __user *result, size_t *lenp, loff_t *ppos)35 void __user *result, size_t *lenp, loff_t *ppos)
36{36{
37 struct parport *port = (struct parport *)table->extra1;37 struct parport *port = (struct parport *)table->extra1;
@@ -68,7 +68,7 @@ static int do_active_device(ctl_table *table, int write, struct file *filp, · 30 unmodified lines
68}68}
69 69
70#ifdef CONFIG_PARPORT_128470#ifdef CONFIG_PARPORT_1284
71static int do_autoprobe(ctl_table *table, int write, struct file *filp,71static int do_autoprobe(ctl_table *table, int write,
72 void __user *result, size_t *lenp, loff_t *ppos)72 void __user *result, size_t *lenp, loff_t *ppos)
73{73{
74 struct parport_device_info *info = table->extra2;74 struct parport_device_info *info = table->extra2;
@@ -111,7 +111,7 @@ static int do_autoprobe(ctl_table *table, int write, struct file *filp, · 36 unmodified lines
111#endif /* IEEE1284.3 support. */111#endif /* IEEE1284.3 support. */
112 112
113static int do_hardware_base_addr (ctl_table *table, int write,113static int do_hardware_base_addr (ctl_table *table, int write,
114 struct file *filp, void __user *result,114 void __user *result,
115 size_t *lenp, loff_t *ppos)115 size_t *lenp, loff_t *ppos)
116{116{
117 struct parport *port = (struct parport *)table->extra1;117 struct parport *port = (struct parport *)table->extra1;
@@ -139,7 +139,7 @@ static int do_hardware_base_addr (ctl_table *table, int write, · 21 unmodified lines
139}139}
140 140
141static int do_hardware_irq (ctl_table *table, int write,141static int do_hardware_irq (ctl_table *table, int write,
142 struct file *filp, void __user *result,142 void __user *result,
143 size_t *lenp, loff_t *ppos)143 size_t *lenp, loff_t *ppos)
144{144{
145 struct parport *port = (struct parport *)table->extra1;145 struct parport *port = (struct parport *)table->extra1;
@@ -167,7 +167,7 @@ static int do_hardware_irq (ctl_table *table, int write, · 21 unmodified lines
167}167}
168 168
169static int do_hardware_dma (ctl_table *table, int write,169static int do_hardware_dma (ctl_table *table, int write,
170 struct file *filp, void __user *result,170 void __user *result,
171 size_t *lenp, loff_t *ppos)171 size_t *lenp, loff_t *ppos)
172{172{
173 struct parport *port = (struct parport *)table->extra1;173 struct parport *port = (struct parport *)table->extra1;
@@ -195,7 +195,7 @@ static int do_hardware_dma (ctl_table *table, int write, · 21 unmodified lines
195}195}
196 196
197static int do_hardware_modes (ctl_table *table, int write,197static int do_hardware_modes (ctl_table *table, int write,
198 struct file *filp, void __user *result,198 void __user *result,
199 size_t *lenp, loff_t *ppos)199 size_t *lenp, loff_t *ppos)
200{200{
201 struct parport *port = (struct parport *)table->extra1;201 struct parport *port = (struct parport *)table->extra1;
fs/coda/coda_int.h+1−0
@@ -2,6 +2,7 @@ · 1 unmodified line
2#define _CODA_INT_2#define _CODA_INT_
3 3
4struct dentry;4struct dentry;
5struct file;
5 6
6extern struct file_system_type coda_fs_type;7extern struct file_system_type coda_fs_type;
7extern unsigned long coda_timeout;8extern unsigned long coda_timeout;
fs/drop_caches.c+2−2
@@ -63,9 +63,9 @@ static void drop_slab(void) · 62 unmodified lines
63}63}
64 64
65int drop_caches_sysctl_handler(ctl_table *table, int write,65int drop_caches_sysctl_handler(ctl_table *table, int write,
66 struct file *file, void __user *buffer, size_t *length, loff_t *ppos)66 void __user *buffer, size_t *length, loff_t *ppos)
67{67{
68 proc_dointvec_minmax(table, write, file, buffer, length, ppos);68 proc_dointvec_minmax(table, write, buffer, length, ppos);
69 if (write) {69 if (write) {
70 if (sysctl_drop_caches & 1)70 if (sysctl_drop_caches & 1)
71 drop_pagecache();71 drop_pagecache();
fs/file_table.c+3−3
@@ -74,14 +74,14 @@ EXPORT_SYMBOL_GPL(get_max_files); · 73 unmodified lines
74 * Handle nr_files sysctl74 * Handle nr_files sysctl
75 */75 */
76#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)76#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
77int proc_nr_files(ctl_table *table, int write, struct file *filp,77int proc_nr_files(ctl_table *table, int write,
78 void __user *buffer, size_t *lenp, loff_t *ppos)78 void __user *buffer, size_t *lenp, loff_t *ppos)
79{79{
80 files_stat.nr_files = get_nr_files();80 files_stat.nr_files = get_nr_files();
81 return proc_dointvec(table, write, filp, buffer, lenp, ppos);81 return proc_dointvec(table, write, buffer, lenp, ppos);
82}82}
83#else83#else
84int proc_nr_files(ctl_table *table, int write, struct file *filp,84int proc_nr_files(ctl_table *table, int write,
85 void __user *buffer, size_t *lenp, loff_t *ppos)85 void __user *buffer, size_t *lenp, loff_t *ppos)
86{86{
87 return -ENOSYS;87 return -ENOSYS;
fs/proc/proc_sysctl.c+1−1
@@ -153,7 +153,7 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *buf, · 152 unmodified lines
153 153
154 /* careful: calling conventions are nasty here */154 /* careful: calling conventions are nasty here */
155 res = count;155 res = count;
156 error = table->proc_handler(table, write, filp, buf, &res, ppos);156 error = table->proc_handler(table, write, buf, &res, ppos);
157 if (!error)157 if (!error)
158 error = res;158 error = res;
159out:159out:
fs/xfs/linux-2.6/xfs_sysctl.c+1−2
@@ -26,7 +26,6 @@ STATIC int · 25 unmodified lines
26xfs_stats_clear_proc_handler(26xfs_stats_clear_proc_handler(
27 ctl_table *ctl,27 ctl_table *ctl,
28 int write,28 int write,
29 struct file *filp,
30 void __user *buffer,29 void __user *buffer,
31 size_t *lenp,30 size_t *lenp,
32 loff_t *ppos)31 loff_t *ppos)
@@ -34,7 +33,7 @@ xfs_stats_clear_proc_handler( · 1 unmodified line
34 int c, ret, *valp = ctl->data;33 int c, ret, *valp = ctl->data;
35 __uint32_t vn_active;34 __uint32_t vn_active;
36 35
37 ret = proc_dointvec_minmax(ctl, write, filp, buffer, lenp, ppos);36 ret = proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
38 37
39 if (!ret && write && *valp) {38 if (!ret && write && *valp) {
40 printk("XFS Clearing xfsstats\n");39 printk("XFS Clearing xfsstats\n");
include/linux/fs.h+1−1
@@ -2467,7 +2467,7 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, · 2466 unmodified lines
2467 size_t len, loff_t *ppos);2467 size_t len, loff_t *ppos);
2468 2468
2469struct ctl_table;2469struct ctl_table;
2470int proc_nr_files(struct ctl_table *table, int write, struct file *filp,2470int proc_nr_files(struct ctl_table *table, int write,
2471 void __user *buffer, size_t *lenp, loff_t *ppos);2471 void __user *buffer, size_t *lenp, loff_t *ppos);
2472 2472
2473int __init get_filesystem_list(char *buf);2473int __init get_filesystem_list(char *buf);
include/linux/ftrace.h+2−2
@@ -19,7 +19,7 @@ · 18 unmodified lines
19extern int ftrace_enabled;19extern int ftrace_enabled;
20extern int20extern int
21ftrace_enable_sysctl(struct ctl_table *table, int write,21ftrace_enable_sysctl(struct ctl_table *table, int write,
22 struct file *filp, void __user *buffer, size_t *lenp,22 void __user *buffer, size_t *lenp,
23 loff_t *ppos);23 loff_t *ppos);
24 24
25typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);25typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);
@@ -94,7 +94,7 @@ static inline void ftrace_start(void) { } · 68 unmodified lines
94extern int stack_tracer_enabled;94extern int stack_tracer_enabled;
95int95int
96stack_trace_sysctl(struct ctl_table *table, int write,96stack_trace_sysctl(struct ctl_table *table, int write,
97 struct file *file, void __user *buffer, size_t *lenp,97 void __user *buffer, size_t *lenp,
98 loff_t *ppos);98 loff_t *ppos);
99#endif99#endif
100 100
include/linux/hugetlb.h+3−3
@@ -20,9 +20,9 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) · 19 unmodified lines
20}20}
21 21
22void reset_vma_resv_huge_pages(struct vm_area_struct *vma);22void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
23int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *);23int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
24int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *);24int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
25int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *);25int hugetlb_treat_movable_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
26int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);26int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);
27int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,27int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,
28 struct page **, struct vm_area_struct **,28 struct page **, struct vm_area_struct **,
include/linux/mm.h+1−1
@@ -1279,7 +1279,7 @@ int in_gate_area_no_task(unsigned long addr); · 1278 unmodified lines
1279#define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);})1279#define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);})
1280#endif /* __HAVE_ARCH_GATE_AREA */1280#endif /* __HAVE_ARCH_GATE_AREA */
1281 1281
1282int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,1282int drop_caches_sysctl_handler(struct ctl_table *, int,
1283 void __user *, size_t *, loff_t *);1283 void __user *, size_t *, loff_t *);
1284unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,1284unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
1285 unsigned long lru_pages);1285 unsigned long lru_pages);
include/linux/mmzone.h+6−7
@@ -755,21 +755,20 @@ static inline int is_dma(struct zone *zone) · 754 unmodified lines
755 755
756/* These two functions are used to setup the per zone pages min values */756/* These two functions are used to setup the per zone pages min values */
757struct ctl_table;757struct ctl_table;
758struct file;758int min_free_kbytes_sysctl_handler(struct ctl_table *, int,
759int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *,
760 void __user *, size_t *, loff_t *);759 void __user *, size_t *, loff_t *);
761extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1];760extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1];
762int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *,761int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int,
763 void __user *, size_t *, loff_t *);762 void __user *, size_t *, loff_t *);
764int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *,763int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
765 void __user *, size_t *, loff_t *);764 void __user *, size_t *, loff_t *);
766int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,765int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
767 struct file *, void __user *, size_t *, loff_t *);766 void __user *, size_t *, loff_t *);
768int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,767int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
769 struct file *, void __user *, size_t *, loff_t *);768 void __user *, size_t *, loff_t *);
770 769
771extern int numa_zonelist_order_handler(struct ctl_table *, int,770extern int numa_zonelist_order_handler(struct ctl_table *, int,
772 struct file *, void __user *, size_t *, loff_t *);771 void __user *, size_t *, loff_t *);
773extern char numa_zonelist_order[];772extern char numa_zonelist_order[];
774#define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */773#define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */
775 774
include/linux/sched.h+4−4
@@ -309,7 +309,7 @@ extern void softlockup_tick(void); · 308 unmodified lines
309extern void touch_softlockup_watchdog(void);309extern void touch_softlockup_watchdog(void);
310extern void touch_all_softlockup_watchdogs(void);310extern void touch_all_softlockup_watchdogs(void);
311extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,311extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
312 struct file *filp, void __user *buffer,312 void __user *buffer,
313 size_t *lenp, loff_t *ppos);313 size_t *lenp, loff_t *ppos);
314extern unsigned int softlockup_panic;314extern unsigned int softlockup_panic;
315extern int softlockup_thresh;315extern int softlockup_thresh;
@@ -331,7 +331,7 @@ extern unsigned long sysctl_hung_task_check_count; · 15 unmodified lines
331extern unsigned long sysctl_hung_task_timeout_secs;331extern unsigned long sysctl_hung_task_timeout_secs;
332extern unsigned long sysctl_hung_task_warnings;332extern unsigned long sysctl_hung_task_warnings;
333extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,333extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
334 struct file *filp, void __user *buffer,334 void __user *buffer,
335 size_t *lenp, loff_t *ppos);335 size_t *lenp, loff_t *ppos);
336#endif336#endif
337 337
@@ -1906,7 +1906,7 @@ extern unsigned int sysctl_sched_time_avg; · 1568 unmodified lines
1906extern unsigned int sysctl_timer_migration;1906extern unsigned int sysctl_timer_migration;
1907 1907
1908int sched_nr_latency_handler(struct ctl_table *table, int write,1908int sched_nr_latency_handler(struct ctl_table *table, int write,
1909 struct file *file, void __user *buffer, size_t *length,1909 void __user *buffer, size_t *length,
1910 loff_t *ppos);1910 loff_t *ppos);
1911#endif1911#endif
1912#ifdef CONFIG_SCHED_DEBUG1912#ifdef CONFIG_SCHED_DEBUG
@@ -1924,7 +1924,7 @@ extern unsigned int sysctl_sched_rt_period; · 11 unmodified lines
1924extern int sysctl_sched_rt_runtime;1924extern int sysctl_sched_rt_runtime;
1925 1925
1926int sched_rt_handler(struct ctl_table *table, int write,1926int sched_rt_handler(struct ctl_table *table, int write,
1927 struct file *filp, void __user *buffer, size_t *lenp,1927 void __user *buffer, size_t *lenp,
1928 loff_t *ppos);1928 loff_t *ppos);
1929 1929
1930extern unsigned int sysctl_sched_compat_yield;1930extern unsigned int sysctl_sched_compat_yield;
include/linux/security.h+1−1
@@ -133,7 +133,7 @@ static inline unsigned long round_hint_to_min(unsigned long hint) · 132 unmodified lines
133 return PAGE_ALIGN(mmap_min_addr);133 return PAGE_ALIGN(mmap_min_addr);
134 return hint;134 return hint;
135}135}
136extern int mmap_min_addr_handler(struct ctl_table *table, int write, struct file *filp,136extern int mmap_min_addr_handler(struct ctl_table *table, int write,
137 void __user *buffer, size_t *lenp, loff_t *ppos);137 void __user *buffer, size_t *lenp, loff_t *ppos);
138 138
139#ifdef CONFIG_SECURITY139#ifdef CONFIG_SECURITY
include/linux/swap.h+1−1
@@ -245,7 +245,7 @@ extern int page_evictable(struct page *page, struct vm_area_struct *vma); · 244 unmodified lines
245extern void scan_mapping_unevictable_pages(struct address_space *);245extern void scan_mapping_unevictable_pages(struct address_space *);
246 246
247extern unsigned long scan_unevictable_pages;247extern unsigned long scan_unevictable_pages;
248extern int scan_unevictable_handler(struct ctl_table *, int, struct file *,248extern int scan_unevictable_handler(struct ctl_table *, int,
249 void __user *, size_t *, loff_t *);249 void __user *, size_t *, loff_t *);
250extern int scan_unevictable_register_node(struct node *node);250extern int scan_unevictable_register_node(struct node *node);
251extern void scan_unevictable_unregister_node(struct node *node);251extern void scan_unevictable_unregister_node(struct node *node);
include/linux/sysctl.h+9−10
@@ -29,7 +29,6 @@ · 28 unmodified lines
29#include <linux/types.h>29#include <linux/types.h>
30#include <linux/compiler.h>30#include <linux/compiler.h>
31 31
32struct file;
33struct completion;32struct completion;
34 33
35#define CTL_MAXNAME 10 /* how many path components do we allow in a34#define CTL_MAXNAME 10 /* how many path components do we allow in a
@@ -977,25 +976,25 @@ typedef int ctl_handler (struct ctl_table *table, · 941 unmodified lines
977 void __user *oldval, size_t __user *oldlenp,976 void __user *oldval, size_t __user *oldlenp,
978 void __user *newval, size_t newlen);977 void __user *newval, size_t newlen);
979 978
980typedef int proc_handler (struct ctl_table *ctl, int write, struct file * filp,979typedef int proc_handler (struct ctl_table *ctl, int write,
981 void __user *buffer, size_t *lenp, loff_t *ppos);980 void __user *buffer, size_t *lenp, loff_t *ppos);
982 981
983extern int proc_dostring(struct ctl_table *, int, struct file *,982extern int proc_dostring(struct ctl_table *, int,
984 void __user *, size_t *, loff_t *);983 void __user *, size_t *, loff_t *);
985extern int proc_dointvec(struct ctl_table *, int, struct file *,984extern int proc_dointvec(struct ctl_table *, int,
986 void __user *, size_t *, loff_t *);985 void __user *, size_t *, loff_t *);
987extern int proc_dointvec_minmax(struct ctl_table *, int, struct file *,986extern int proc_dointvec_minmax(struct ctl_table *, int,
988 void __user *, size_t *, loff_t *);987 void __user *, size_t *, loff_t *);
989extern int proc_dointvec_jiffies(struct ctl_table *, int, struct file *,988extern int proc_dointvec_jiffies(struct ctl_table *, int,
990 void __user *, size_t *, loff_t *);989 void __user *, size_t *, loff_t *);
991extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, struct file *,990extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int,
992 void __user *, size_t *, loff_t *);991 void __user *, size_t *, loff_t *);
993extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, struct file *,992extern int proc_dointvec_ms_jiffies(struct ctl_table *, int,
994 void __user *, size_t *, loff_t *);993 void __user *, size_t *, loff_t *);
995extern int proc_doulongvec_minmax(struct ctl_table *, int, struct file *,994extern int proc_doulongvec_minmax(struct ctl_table *, int,
996 void __user *, size_t *, loff_t *);995 void __user *, size_t *, loff_t *);
997extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,996extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
998 struct file *, void __user *, size_t *, loff_t *);997 void __user *, size_t *, loff_t *);
999 998
1000extern int do_sysctl (int __user *name, int nlen,999extern int do_sysctl (int __user *name, int nlen,
1001 void __user *oldval, size_t __user *oldlenp,1000 void __user *oldval, size_t __user *oldlenp,
include/linux/writeback.h+5−6
@@ -110,21 +110,20 @@ extern int laptop_mode; · 109 unmodified lines
110extern unsigned long determine_dirtyable_memory(void);110extern unsigned long determine_dirtyable_memory(void);
111 111
112extern int dirty_background_ratio_handler(struct ctl_table *table, int write,112extern int dirty_background_ratio_handler(struct ctl_table *table, int write,
113 struct file *filp, void __user *buffer, size_t *lenp,113 void __user *buffer, size_t *lenp,
114 loff_t *ppos);114 loff_t *ppos);
115extern int dirty_background_bytes_handler(struct ctl_table *table, int write,115extern int dirty_background_bytes_handler(struct ctl_table *table, int write,
116 struct file *filp, void __user *buffer, size_t *lenp,116 void __user *buffer, size_t *lenp,
117 loff_t *ppos);117 loff_t *ppos);
118extern int dirty_ratio_handler(struct ctl_table *table, int write,118extern int dirty_ratio_handler(struct ctl_table *table, int write,
119 struct file *filp, void __user *buffer, size_t *lenp,119 void __user *buffer, size_t *lenp,
120 loff_t *ppos);120 loff_t *ppos);
121extern int dirty_bytes_handler(struct ctl_table *table, int write,121extern int dirty_bytes_handler(struct ctl_table *table, int write,
122 struct file *filp, void __user *buffer, size_t *lenp,122 void __user *buffer, size_t *lenp,
123 loff_t *ppos);123 loff_t *ppos);
124 124
125struct ctl_table;125struct ctl_table;
126struct file;126int dirty_writeback_centisecs_handler(struct ctl_table *, int,
127int dirty_writeback_centisecs_handler(struct ctl_table *, int, struct file *,
128 void __user *, size_t *, loff_t *);127 void __user *, size_t *, loff_t *);
129 128
130void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty,129void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty,
include/net/ip.h+1−1
@@ -399,7 +399,7 @@ extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, · 398 unmodified lines
399 * fed into the routing cache should use these handlers.399 * fed into the routing cache should use these handlers.
400 */400 */
401int ipv4_doint_and_flush(ctl_table *ctl, int write,401int ipv4_doint_and_flush(ctl_table *ctl, int write,
402 struct file* filp, void __user *buffer,402 void __user *buffer,
403 size_t *lenp, loff_t *ppos);403 size_t *lenp, loff_t *ppos);
404int ipv4_doint_and_flush_strategy(ctl_table *table,404int ipv4_doint_and_flush_strategy(ctl_table *table,
405 void __user *oldval, size_t __user *oldlenp,405 void __user *oldval, size_t __user *oldlenp,
include/net/ndisc.h+0−2
@@ -55,7 +55,6 @@ enum { · 54 unmodified lines
55#include <net/neighbour.h>55#include <net/neighbour.h>
56 56
57struct ctl_table;57struct ctl_table;
58struct file;
59struct inet6_dev;58struct inet6_dev;
60struct net_device;59struct net_device;
61struct net_proto_family;60struct net_proto_family;
@@ -139,7 +138,6 @@ extern int igmp6_event_report(struct sk_buff *skb); · 77 unmodified lines
139#ifdef CONFIG_SYSCTL138#ifdef CONFIG_SYSCTL
140extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl,139extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl,
141 int write,140 int write,
142 struct file * filp,
143 void __user *buffer,141 void __user *buffer,
144 size_t *lenp,142 size_t *lenp,
145 loff_t *ppos);143 loff_t *ppos);
ipc/ipc_sysctl.c+8−8
@@ -27,18 +27,18 @@ static void *get_ipc(ctl_table *table) · 26 unmodified lines
27}27}
28 28
29#ifdef CONFIG_PROC_SYSCTL29#ifdef CONFIG_PROC_SYSCTL
30static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,30static int proc_ipc_dointvec(ctl_table *table, int write,
31 void __user *buffer, size_t *lenp, loff_t *ppos)31 void __user *buffer, size_t *lenp, loff_t *ppos)
32{32{
33 struct ctl_table ipc_table;33 struct ctl_table ipc_table;
34 memcpy(&ipc_table, table, sizeof(ipc_table));34 memcpy(&ipc_table, table, sizeof(ipc_table));
35 ipc_table.data = get_ipc(table);35 ipc_table.data = get_ipc(table);
36 36
37 return proc_dointvec(&ipc_table, write, filp, buffer, lenp, ppos);37 return proc_dointvec(&ipc_table, write, buffer, lenp, ppos);
38}38}
39 39
40static int proc_ipc_callback_dointvec(ctl_table *table, int write,40static int proc_ipc_callback_dointvec(ctl_table *table, int write,
41 struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)41 void __user *buffer, size_t *lenp, loff_t *ppos)
42{42{
43 struct ctl_table ipc_table;43 struct ctl_table ipc_table;
44 size_t lenp_bef = *lenp;44 size_t lenp_bef = *lenp;
@@ -47,7 +47,7 @@ static int proc_ipc_callback_dointvec(ctl_table *table, int write, · 2 unmodified lines
47 memcpy(&ipc_table, table, sizeof(ipc_table));47 memcpy(&ipc_table, table, sizeof(ipc_table));
48 ipc_table.data = get_ipc(table);48 ipc_table.data = get_ipc(table);
49 49
50 rc = proc_dointvec(&ipc_table, write, filp, buffer, lenp, ppos);50 rc = proc_dointvec(&ipc_table, write, buffer, lenp, ppos);
51 51
52 if (write && !rc && lenp_bef == *lenp)52 if (write && !rc && lenp_bef == *lenp)
53 /*53 /*
@@ -61,13 +61,13 @@ static int proc_ipc_callback_dointvec(ctl_table *table, int write, · 7 unmodified lines
61}61}
62 62
63static int proc_ipc_doulongvec_minmax(ctl_table *table, int write,63static int proc_ipc_doulongvec_minmax(ctl_table *table, int write,
64 struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)64 void __user *buffer, size_t *lenp, loff_t *ppos)
65{65{
66 struct ctl_table ipc_table;66 struct ctl_table ipc_table;
67 memcpy(&ipc_table, table, sizeof(ipc_table));67 memcpy(&ipc_table, table, sizeof(ipc_table));
68 ipc_table.data = get_ipc(table);68 ipc_table.data = get_ipc(table);
69 69
70 return proc_doulongvec_minmax(&ipc_table, write, filp, buffer,70 return proc_doulongvec_minmax(&ipc_table, write, buffer,
71 lenp, ppos);71 lenp, ppos);
72}72}
73 73
@@ -95,7 +95,7 @@ static void ipc_auto_callback(int val) · 21 unmodified lines
95}95}
96 96
97static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write,97static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write,
98 struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)98 void __user *buffer, size_t *lenp, loff_t *ppos)
99{99{
100 struct ctl_table ipc_table;100 struct ctl_table ipc_table;
101 size_t lenp_bef = *lenp;101 size_t lenp_bef = *lenp;
@@ -106,7 +106,7 @@ static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, · 4 unmodified lines
106 ipc_table.data = get_ipc(table);106 ipc_table.data = get_ipc(table);
107 oldval = *((int *)(ipc_table.data));107 oldval = *((int *)(ipc_table.data));
108 108
109 rc = proc_dointvec_minmax(&ipc_table, write, filp, buffer, lenp, ppos);109 rc = proc_dointvec_minmax(&ipc_table, write, buffer, lenp, ppos);
110 110
111 if (write && !rc && lenp_bef == *lenp) {111 if (write && !rc && lenp_bef == *lenp) {
112 int newval = *((int *)(ipc_table.data));112 int newval = *((int *)(ipc_table.data));
ipc/mq_sysctl.c+4−4
@@ -31,24 +31,24 @@ static void *get_mq(ctl_table *table) · 30 unmodified lines
31 return which;31 return which;
32}32}
33 33
34static int proc_mq_dointvec(ctl_table *table, int write, struct file *filp,34static int proc_mq_dointvec(ctl_table *table, int write,
35 void __user *buffer, size_t *lenp, loff_t *ppos)35 void __user *buffer, size_t *lenp, loff_t *ppos)
36{36{
37 struct ctl_table mq_table;37 struct ctl_table mq_table;
38 memcpy(&mq_table, table, sizeof(mq_table));38 memcpy(&mq_table, table, sizeof(mq_table));
39 mq_table.data = get_mq(table);39 mq_table.data = get_mq(table);
40 40
41 return proc_dointvec(&mq_table, write, filp, buffer, lenp, ppos);41 return proc_dointvec(&mq_table, write, buffer, lenp, ppos);
42}42}
43 43
44static int proc_mq_dointvec_minmax(ctl_table *table, int write,44static int proc_mq_dointvec_minmax(ctl_table *table, int write,
45 struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos)45 void __user *buffer, size_t *lenp, loff_t *ppos)
46{46{
47 struct ctl_table mq_table;47 struct ctl_table mq_table;
48 memcpy(&mq_table, table, sizeof(mq_table));48 memcpy(&mq_table, table, sizeof(mq_table));
49 mq_table.data = get_mq(table);49 mq_table.data = get_mq(table);
50 50
51 return proc_dointvec_minmax(&mq_table, write, filp, buffer,51 return proc_dointvec_minmax(&mq_table, write, buffer,
52 lenp, ppos);52 lenp, ppos);
53}53}
54#else54#else
kernel/hung_task.c+2−2
@@ -171,12 +171,12 @@ static unsigned long timeout_jiffies(unsigned long timeout) · 170 unmodified lines
171 * Process updating of timeout sysctl171 * Process updating of timeout sysctl
172 */172 */
173int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,173int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
174 struct file *filp, void __user *buffer,174 void __user *buffer,
175 size_t *lenp, loff_t *ppos)175 size_t *lenp, loff_t *ppos)
176{176{
177 int ret;177 int ret;
178 178
179 ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);179 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
180 180
181 if (ret || !write)181 if (ret || !write)
182 goto out;182 goto out;
kernel/sched.c+2−2
@@ -10312,7 +10312,7 @@ static int sched_rt_global_constraints(void) · 10311 unmodified lines
10312#endif /* CONFIG_RT_GROUP_SCHED */10312#endif /* CONFIG_RT_GROUP_SCHED */
10313 10313
10314int sched_rt_handler(struct ctl_table *table, int write,10314int sched_rt_handler(struct ctl_table *table, int write,
10315 struct file *filp, void __user *buffer, size_t *lenp,10315 void __user *buffer, size_t *lenp,
10316 loff_t *ppos)10316 loff_t *ppos)
10317{10317{
10318 int ret;10318 int ret;
@@ -10323,7 +10323,7 @@ int sched_rt_handler(struct ctl_table *table, int write, · 4 unmodified lines
10323 old_period = sysctl_sched_rt_period;10323 old_period = sysctl_sched_rt_period;
10324 old_runtime = sysctl_sched_rt_runtime;10324 old_runtime = sysctl_sched_rt_runtime;
10325 10325
10326 ret = proc_dointvec(table, write, filp, buffer, lenp, ppos);10326 ret = proc_dointvec(table, write, buffer, lenp, ppos);
10327 10327
10328 if (!ret && write) {10328 if (!ret && write) {
10329 ret = sched_rt_global_constraints();10329 ret = sched_rt_global_constraints();
kernel/sched_fair.c+2−2
@@ -384,10 +384,10 @@ static struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq) · 383 unmodified lines
384 384
385#ifdef CONFIG_SCHED_DEBUG385#ifdef CONFIG_SCHED_DEBUG
386int sched_nr_latency_handler(struct ctl_table *table, int write,386int sched_nr_latency_handler(struct ctl_table *table, int write,
387 struct file *filp, void __user *buffer, size_t *lenp,387 void __user *buffer, size_t *lenp,
388 loff_t *ppos)388 loff_t *ppos)
389{389{
390 int ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);390 int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
391 391
392 if (ret || !write)392 if (ret || !write)
393 return ret;393 return ret;
kernel/slow-work.c+6−6
@@ -26,10 +26,10 @@ static void slow_work_cull_timeout(unsigned long); · 25 unmodified lines
26static void slow_work_oom_timeout(unsigned long);26static void slow_work_oom_timeout(unsigned long);
27 27
28#ifdef CONFIG_SYSCTL28#ifdef CONFIG_SYSCTL
29static int slow_work_min_threads_sysctl(struct ctl_table *, int, struct file *,29static int slow_work_min_threads_sysctl(struct ctl_table *, int,
30 void __user *, size_t *, loff_t *);30 void __user *, size_t *, loff_t *);
31 31
32static int slow_work_max_threads_sysctl(struct ctl_table *, int , struct file *,32static int slow_work_max_threads_sysctl(struct ctl_table *, int ,
33 void __user *, size_t *, loff_t *);33 void __user *, size_t *, loff_t *);
34#endif34#endif
35 35
@@ -493,10 +493,10 @@ static void slow_work_oom_timeout(unsigned long data) · 457 unmodified lines
493 * Handle adjustment of the minimum number of threads493 * Handle adjustment of the minimum number of threads
494 */494 */
495static int slow_work_min_threads_sysctl(struct ctl_table *table, int write,495static int slow_work_min_threads_sysctl(struct ctl_table *table, int write,
496 struct file *filp, void __user *buffer,496 void __user *buffer,
497 size_t *lenp, loff_t *ppos)497 size_t *lenp, loff_t *ppos)
498{498{
499 int ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);499 int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
500 int n;500 int n;
501 501
502 if (ret == 0) {502 if (ret == 0) {
@@ -521,10 +521,10 @@ static int slow_work_min_threads_sysctl(struct ctl_table *table, int write, · 18 unmodified lines
521 * Handle adjustment of the maximum number of threads521 * Handle adjustment of the maximum number of threads
522 */522 */
523static int slow_work_max_threads_sysctl(struct ctl_table *table, int write,523static int slow_work_max_threads_sysctl(struct ctl_table *table, int write,
524 struct file *filp, void __user *buffer,524 void __user *buffer,
525 size_t *lenp, loff_t *ppos)525 size_t *lenp, loff_t *ppos)
526{526{
527 int ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);527 int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
528 int n;528 int n;
529 529
530 if (ret == 0) {530 if (ret == 0) {
kernel/softlockup.c+2−2
@@ -90,11 +90,11 @@ void touch_all_softlockup_watchdogs(void) · 89 unmodified lines
90EXPORT_SYMBOL(touch_all_softlockup_watchdogs);90EXPORT_SYMBOL(touch_all_softlockup_watchdogs);
91 91
92int proc_dosoftlockup_thresh(struct ctl_table *table, int write,92int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
93 struct file *filp, void __user *buffer,93 void __user *buffer,
94 size_t *lenp, loff_t *ppos)94 size_t *lenp, loff_t *ppos)
95{95{
96 touch_all_softlockup_watchdogs();96 touch_all_softlockup_watchdogs();
97 return proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);97 return proc_dointvec_minmax(table, write, buffer, lenp, ppos);
98}98}
99 99
100/*100/*
kernel/sysctl.c+33−45
@@ -163,9 +163,9 @@ extern int max_lock_depth; · 162 unmodified lines
163#endif163#endif
164 164
165#ifdef CONFIG_PROC_SYSCTL165#ifdef CONFIG_PROC_SYSCTL
166static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp,166static int proc_do_cad_pid(struct ctl_table *table, int write,
167 void __user *buffer, size_t *lenp, loff_t *ppos);167 void __user *buffer, size_t *lenp, loff_t *ppos);
168static int proc_taint(struct ctl_table *table, int write, struct file *filp,168static int proc_taint(struct ctl_table *table, int write,
169 void __user *buffer, size_t *lenp, loff_t *ppos);169 void __user *buffer, size_t *lenp, loff_t *ppos);
170#endif170#endif
171 171
@@ -2226,7 +2226,7 @@ void sysctl_head_put(struct ctl_table_header *head) · 2054 unmodified lines
2226#ifdef CONFIG_PROC_SYSCTL2226#ifdef CONFIG_PROC_SYSCTL
2227 2227
2228static int _proc_do_string(void* data, int maxlen, int write,2228static int _proc_do_string(void* data, int maxlen, int write,
2229 struct file *filp, void __user *buffer,2229 void __user *buffer,
2230 size_t *lenp, loff_t *ppos)2230 size_t *lenp, loff_t *ppos)
2231{2231{
2232 size_t len;2232 size_t len;
@@ -2287,7 +2287,6 @@ static int _proc_do_string(void* data, int maxlen, int write, · 54 unmodified lines
2287 * proc_dostring - read a string sysctl2287 * proc_dostring - read a string sysctl
2288 * @table: the sysctl table2288 * @table: the sysctl table
2289 * @write: %TRUE if this is a write to the sysctl file2289 * @write: %TRUE if this is a write to the sysctl file
2290 * @filp: the file structure
2291 * @buffer: the user buffer2290 * @buffer: the user buffer
2292 * @lenp: the size of the user buffer2291 * @lenp: the size of the user buffer
2293 * @ppos: file position2292 * @ppos: file position
@@ -2301,10 +2300,10 @@ static int _proc_do_string(void* data, int maxlen, int write, · 7 unmodified lines
2301 *2300 *
2302 * Returns 0 on success.2301 * Returns 0 on success.
2303 */2302 */
2304int proc_dostring(struct ctl_table *table, int write, struct file *filp,2303int proc_dostring(struct ctl_table *table, int write,
2305 void __user *buffer, size_t *lenp, loff_t *ppos)2304 void __user *buffer, size_t *lenp, loff_t *ppos)
2306{2305{
2307 return _proc_do_string(table->data, table->maxlen, write, filp,2306 return _proc_do_string(table->data, table->maxlen, write,
2308 buffer, lenp, ppos);2307 buffer, lenp, ppos);
2309}2308}
2310 2309
@@ -2329,7 +2328,7 @@ static int do_proc_dointvec_conv(int *negp, unsigned long *lvalp, · 18 unmodified lines
2329}2328}
2330 2329
2331static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,2330static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
2332 int write, struct file *filp, void __user *buffer,2331 int write, void __user *buffer,
2333 size_t *lenp, loff_t *ppos,2332 size_t *lenp, loff_t *ppos,
2334 int (*conv)(int *negp, unsigned long *lvalp, int *valp,2333 int (*conv)(int *negp, unsigned long *lvalp, int *valp,
2335 int write, void *data),2334 int write, void *data),
@@ -2436,13 +2435,13 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, · 100 unmodified lines
2436#undef TMPBUFLEN2435#undef TMPBUFLEN
2437}2436}
2438 2437
2439static int do_proc_dointvec(struct ctl_table *table, int write, struct file *filp,2438static int do_proc_dointvec(struct ctl_table *table, int write,
2440 void __user *buffer, size_t *lenp, loff_t *ppos,2439 void __user *buffer, size_t *lenp, loff_t *ppos,
2441 int (*conv)(int *negp, unsigned long *lvalp, int *valp,2440 int (*conv)(int *negp, unsigned long *lvalp, int *valp,
2442 int write, void *data),2441 int write, void *data),
2443 void *data)2442 void *data)
2444{2443{
2445 return __do_proc_dointvec(table->data, table, write, filp,2444 return __do_proc_dointvec(table->data, table, write,
2446 buffer, lenp, ppos, conv, data);2445 buffer, lenp, ppos, conv, data);
2447}2446}
2448 2447
@@ -2450,7 +2449,6 @@ static int do_proc_dointvec(struct ctl_table *table, int write, struct file *fil · 1 unmodified line
2450 * proc_dointvec - read a vector of integers2449 * proc_dointvec - read a vector of integers
2451 * @table: the sysctl table2450 * @table: the sysctl table
2452 * @write: %TRUE if this is a write to the sysctl file2451 * @write: %TRUE if this is a write to the sysctl file
2453 * @filp: the file structure
2454 * @buffer: the user buffer2452 * @buffer: the user buffer
2455 * @lenp: the size of the user buffer2453 * @lenp: the size of the user buffer
2456 * @ppos: file position2454 * @ppos: file position
@@ -2460,10 +2458,10 @@ static int do_proc_dointvec(struct ctl_table *table, int write, struct file *fil · 3 unmodified lines
2460 *2458 *
2461 * Returns 0 on success.2459 * Returns 0 on success.
2462 */2460 */
2463int proc_dointvec(struct ctl_table *table, int write, struct file *filp,2461int proc_dointvec(struct ctl_table *table, int write,
2464 void __user *buffer, size_t *lenp, loff_t *ppos)2462 void __user *buffer, size_t *lenp, loff_t *ppos)
2465{2463{
2466 return do_proc_dointvec(table,write,filp,buffer,lenp,ppos,2464 return do_proc_dointvec(table,write,buffer,lenp,ppos,
2467 NULL,NULL);2465 NULL,NULL);
2468}2466}
2469 2467
@@ -2471,7 +2469,7 @@ int proc_dointvec(struct ctl_table *table, int write, struct file *filp, · 1 unmodified line
2471 * Taint values can only be increased2469 * Taint values can only be increased
2472 * This means we can safely use a temporary.2470 * This means we can safely use a temporary.
2473 */2471 */
2474static int proc_taint(struct ctl_table *table, int write, struct file *filp,2472static int proc_taint(struct ctl_table *table, int write,
2475 void __user *buffer, size_t *lenp, loff_t *ppos)2473 void __user *buffer, size_t *lenp, loff_t *ppos)
2476{2474{
2477 struct ctl_table t;2475 struct ctl_table t;
@@ -2483,7 +2481,7 @@ static int proc_taint(struct ctl_table *table, int write, struct file *filp, · 5 unmodified lines
2483 2481
2484 t = *table;2482 t = *table;
2485 t.data = &tmptaint;2483 t.data = &tmptaint;
2486 err = proc_doulongvec_minmax(&t, write, filp, buffer, lenp, ppos);2484 err = proc_doulongvec_minmax(&t, write, buffer, lenp, ppos);
2487 if (err < 0)2485 if (err < 0)
2488 return err;2486 return err;
2489 2487
@@ -2535,7 +2533,6 @@ static int do_proc_dointvec_minmax_conv(int *negp, unsigned long *lvalp, · 45 unmodified lines
2535 * proc_dointvec_minmax - read a vector of integers with min/max values2533 * proc_dointvec_minmax - read a vector of integers with min/max values
2536 * @table: the sysctl table2534 * @table: the sysctl table
2537 * @write: %TRUE if this is a write to the sysctl file2535 * @write: %TRUE if this is a write to the sysctl file
2538 * @filp: the file structure
2539 * @buffer: the user buffer2536 * @buffer: the user buffer
2540 * @lenp: the size of the user buffer2537 * @lenp: the size of the user buffer
2541 * @ppos: file position2538 * @ppos: file position
@@ -2548,19 +2545,18 @@ static int do_proc_dointvec_minmax_conv(int *negp, unsigned long *lvalp, · 6 unmodified lines
2548 *2545 *
2549 * Returns 0 on success.2546 * Returns 0 on success.
2550 */2547 */
2551int proc_dointvec_minmax(struct ctl_table *table, int write, struct file *filp,2548int proc_dointvec_minmax(struct ctl_table *table, int write,
2552 void __user *buffer, size_t *lenp, loff_t *ppos)2549 void __user *buffer, size_t *lenp, loff_t *ppos)
2553{2550{
2554 struct do_proc_dointvec_minmax_conv_param param = {2551 struct do_proc_dointvec_minmax_conv_param param = {
2555 .min = (int *) table->extra1,2552 .min = (int *) table->extra1,
2556 .max = (int *) table->extra2,2553 .max = (int *) table->extra2,
2557 };2554 };
2558 return do_proc_dointvec(table, write, filp, buffer, lenp, ppos,2555 return do_proc_dointvec(table, write, buffer, lenp, ppos,
2559 do_proc_dointvec_minmax_conv, &param);2556 do_proc_dointvec_minmax_conv, &param);
2560}2557}
2561 2558
2562static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write,2559static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write,
2563 struct file *filp,
2564 void __user *buffer,2560 void __user *buffer,
2565 size_t *lenp, loff_t *ppos,2561 size_t *lenp, loff_t *ppos,
2566 unsigned long convmul,2562 unsigned long convmul,
@@ -2665,21 +2661,19 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int · 98 unmodified lines
2665}2661}
2666 2662
2667static int do_proc_doulongvec_minmax(struct ctl_table *table, int write,2663static int do_proc_doulongvec_minmax(struct ctl_table *table, int write,
2668 struct file *filp,
2669 void __user *buffer,2664 void __user *buffer,
2670 size_t *lenp, loff_t *ppos,2665 size_t *lenp, loff_t *ppos,
2671 unsigned long convmul,2666 unsigned long convmul,
2672 unsigned long convdiv)2667 unsigned long convdiv)
2673{2668{
2674 return __do_proc_doulongvec_minmax(table->data, table, write,2669 return __do_proc_doulongvec_minmax(table->data, table, write,
2675 filp, buffer, lenp, ppos, convmul, convdiv);2670 buffer, lenp, ppos, convmul, convdiv);
2676}2671}
2677 2672
2678/**2673/**
2679 * proc_doulongvec_minmax - read a vector of long integers with min/max values2674 * proc_doulongvec_minmax - read a vector of long integers with min/max values
2680 * @table: the sysctl table2675 * @table: the sysctl table
2681 * @write: %TRUE if this is a write to the sysctl file2676 * @write: %TRUE if this is a write to the sysctl file
2682 * @filp: the file structure
2683 * @buffer: the user buffer2677 * @buffer: the user buffer
2684 * @lenp: the size of the user buffer2678 * @lenp: the size of the user buffer
2685 * @ppos: file position2679 * @ppos: file position
@@ -2692,17 +2686,16 @@ static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, · 6 unmodified lines
2692 *2686 *
2693 * Returns 0 on success.2687 * Returns 0 on success.
2694 */2688 */
2695int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp,2689int proc_doulongvec_minmax(struct ctl_table *table, int write,
2696 void __user *buffer, size_t *lenp, loff_t *ppos)2690 void __user *buffer, size_t *lenp, loff_t *ppos)
2697{2691{
2698 return do_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos, 1l, 1l);2692 return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l);
2699}2693}
2700 2694
2701/**2695/**
2702 * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values with min/max values2696 * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values with min/max values
2703 * @table: the sysctl table2697 * @table: the sysctl table
2704 * @write: %TRUE if this is a write to the sysctl file2698 * @write: %TRUE if this is a write to the sysctl file
2705 * @filp: the file structure
2706 * @buffer: the user buffer2699 * @buffer: the user buffer
2707 * @lenp: the size of the user buffer2700 * @lenp: the size of the user buffer
2708 * @ppos: file position2701 * @ppos: file position
@@ -2717,11 +2710,10 @@ int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp · 8 unmodified lines
2717 * Returns 0 on success.2710 * Returns 0 on success.
2718 */2711 */
2719int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,2712int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
2720 struct file *filp,
2721 void __user *buffer,2713 void __user *buffer,
2722 size_t *lenp, loff_t *ppos)2714 size_t *lenp, loff_t *ppos)
2723{2715{
2724 return do_proc_doulongvec_minmax(table, write, filp, buffer,2716 return do_proc_doulongvec_minmax(table, write, buffer,
2725 lenp, ppos, HZ, 1000l);2717 lenp, ppos, HZ, 1000l);
2726}2718}
2727 2719
@@ -2797,7 +2789,6 @@ static int do_proc_dointvec_ms_jiffies_conv(int *negp, unsigned long *lvalp, · 69 unmodified lines
2797 * proc_dointvec_jiffies - read a vector of integers as seconds2789 * proc_dointvec_jiffies - read a vector of integers as seconds
2798 * @table: the sysctl table2790 * @table: the sysctl table
2799 * @write: %TRUE if this is a write to the sysctl file2791 * @write: %TRUE if this is a write to the sysctl file
2800 * @filp: the file structure
2801 * @buffer: the user buffer2792 * @buffer: the user buffer
2802 * @lenp: the size of the user buffer2793 * @lenp: the size of the user buffer
2803 * @ppos: file position2794 * @ppos: file position
@@ -2809,10 +2800,10 @@ static int do_proc_dointvec_ms_jiffies_conv(int *negp, unsigned long *lvalp, · 5 unmodified lines
2809 *2800 *
2810 * Returns 0 on success.2801 * Returns 0 on success.
2811 */2802 */
2812int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp,2803int proc_dointvec_jiffies(struct ctl_table *table, int write,
2813 void __user *buffer, size_t *lenp, loff_t *ppos)2804 void __user *buffer, size_t *lenp, loff_t *ppos)
2814{2805{
2815 return do_proc_dointvec(table,write,filp,buffer,lenp,ppos,2806 return do_proc_dointvec(table,write,buffer,lenp,ppos,
2816 do_proc_dointvec_jiffies_conv,NULL);2807 do_proc_dointvec_jiffies_conv,NULL);
2817}2808}
2818 2809
@@ -2820,7 +2811,6 @@ int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, · 1 unmodified line
2820 * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds2811 * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds
2821 * @table: the sysctl table2812 * @table: the sysctl table
2822 * @write: %TRUE if this is a write to the sysctl file2813 * @write: %TRUE if this is a write to the sysctl file
2823 * @filp: the file structure
2824 * @buffer: the user buffer2814 * @buffer: the user buffer
2825 * @lenp: the size of the user buffer2815 * @lenp: the size of the user buffer
2826 * @ppos: pointer to the file position2816 * @ppos: pointer to the file position
@@ -2832,10 +2822,10 @@ int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, · 5 unmodified lines
2832 *2822 *
2833 * Returns 0 on success.2823 * Returns 0 on success.
2834 */2824 */
2835int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file *filp,2825int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write,
2836 void __user *buffer, size_t *lenp, loff_t *ppos)2826 void __user *buffer, size_t *lenp, loff_t *ppos)
2837{2827{
2838 return do_proc_dointvec(table,write,filp,buffer,lenp,ppos,2828 return do_proc_dointvec(table,write,buffer,lenp,ppos,
2839 do_proc_dointvec_userhz_jiffies_conv,NULL);2829 do_proc_dointvec_userhz_jiffies_conv,NULL);
2840}2830}
2841 2831
@@ -2843,7 +2833,6 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file · 1 unmodified line
2843 * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds2833 * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds
2844 * @table: the sysctl table2834 * @table: the sysctl table
2845 * @write: %TRUE if this is a write to the sysctl file2835 * @write: %TRUE if this is a write to the sysctl file
2846 * @filp: the file structure
2847 * @buffer: the user buffer2836 * @buffer: the user buffer
2848 * @lenp: the size of the user buffer2837 * @lenp: the size of the user buffer
2849 * @ppos: file position2838 * @ppos: file position
@@ -2856,14 +2845,14 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file · 6 unmodified lines
2856 *2845 *
2857 * Returns 0 on success.2846 * Returns 0 on success.
2858 */2847 */
2859int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, struct file *filp,2848int proc_dointvec_ms_jiffies(struct ctl_table *table, int write,
2860 void __user *buffer, size_t *lenp, loff_t *ppos)2849 void __user *buffer, size_t *lenp, loff_t *ppos)
2861{2850{
2862 return do_proc_dointvec(table, write, filp, buffer, lenp, ppos,2851 return do_proc_dointvec(table, write, buffer, lenp, ppos,
2863 do_proc_dointvec_ms_jiffies_conv, NULL);2852 do_proc_dointvec_ms_jiffies_conv, NULL);
2864}2853}
2865 2854
2866static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp,2855static int proc_do_cad_pid(struct ctl_table *table, int write,
2867 void __user *buffer, size_t *lenp, loff_t *ppos)2856 void __user *buffer, size_t *lenp, loff_t *ppos)
2868{2857{
2869 struct pid *new_pid;2858 struct pid *new_pid;
@@ -2872,7 +2861,7 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp · 2 unmodified lines
2872 2861
2873 tmp = pid_vnr(cad_pid);2862 tmp = pid_vnr(cad_pid);
2874 2863
2875 r = __do_proc_dointvec(&tmp, table, write, filp, buffer,2864 r = __do_proc_dointvec(&tmp, table, write, buffer,
2876 lenp, ppos, NULL, NULL);2865 lenp, ppos, NULL, NULL);
2877 if (r || !write)2866 if (r || !write)
2878 return r;2867 return r;
@@ -2887,50 +2876,49 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp · 8 unmodified lines
2887 2876
2888#else /* CONFIG_PROC_FS */2877#else /* CONFIG_PROC_FS */
2889 2878
2890int proc_dostring(struct ctl_table *table, int write, struct file *filp,2879int proc_dostring(struct ctl_table *table, int write,
2891 void __user *buffer, size_t *lenp, loff_t *ppos)2880 void __user *buffer, size_t *lenp, loff_t *ppos)
2892{2881{
2893 return -ENOSYS;2882 return -ENOSYS;
2894}2883}
2895 2884
2896int proc_dointvec(struct ctl_table *table, int write, struct file *filp,2885int proc_dointvec(struct ctl_table *table, int write,
2897 void __user *buffer, size_t *lenp, loff_t *ppos)2886 void __user *buffer, size_t *lenp, loff_t *ppos)
2898{2887{
2899 return -ENOSYS;2888 return -ENOSYS;
2900}2889}
2901 2890
2902int proc_dointvec_minmax(struct ctl_table *table, int write, struct file *filp,2891int proc_dointvec_minmax(struct ctl_table *table, int write,
2903 void __user *buffer, size_t *lenp, loff_t *ppos)2892 void __user *buffer, size_t *lenp, loff_t *ppos)
2904{2893{
2905 return -ENOSYS;2894 return -ENOSYS;
2906}2895}
2907 2896
2908int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp,2897int proc_dointvec_jiffies(struct ctl_table *table, int write,
2909 void __user *buffer, size_t *lenp, loff_t *ppos)2898 void __user *buffer, size_t *lenp, loff_t *ppos)
2910{2899{
2911 return -ENOSYS;2900 return -ENOSYS;
2912}2901}
2913 2902
2914int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file *filp,2903int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write,
2915 void __user *buffer, size_t *lenp, loff_t *ppos)2904 void __user *buffer, size_t *lenp, loff_t *ppos)
2916{2905{
2917 return -ENOSYS;2906 return -ENOSYS;
2918}2907}
2919 2908
2920int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, struct file *filp,2909int proc_dointvec_ms_jiffies(struct ctl_table *table, int write,
2921 void __user *buffer, size_t *lenp, loff_t *ppos)2910 void __user *buffer, size_t *lenp, loff_t *ppos)
2922{2911{
2923 return -ENOSYS;2912 return -ENOSYS;
2924}2913}
2925 2914
2926int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp,2915int proc_doulongvec_minmax(struct ctl_table *table, int write,
2927 void __user *buffer, size_t *lenp, loff_t *ppos)2916 void __user *buffer, size_t *lenp, loff_t *ppos)
2928{2917{
2929 return -ENOSYS;2918 return -ENOSYS;
2930}2919}
2931 2920
2932int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,2921int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
2933 struct file *filp,
2934 void __user *buffer,2922 void __user *buffer,
2935 size_t *lenp, loff_t *ppos)2923 size_t *lenp, loff_t *ppos)
2936{2924{
kernel/trace/ftrace.c+2−2
@@ -3015,7 +3015,7 @@ int unregister_ftrace_function(struct ftrace_ops *ops) · 3014 unmodified lines
3015 3015
3016int3016int
3017ftrace_enable_sysctl(struct ctl_table *table, int write,3017ftrace_enable_sysctl(struct ctl_table *table, int write,
3018 struct file *file, void __user *buffer, size_t *lenp,3018 void __user *buffer, size_t *lenp,
3019 loff_t *ppos)3019 loff_t *ppos)
3020{3020{
3021 int ret;3021 int ret;
@@ -3025,7 +3025,7 @@ ftrace_enable_sysctl(struct ctl_table *table, int write, · 3 unmodified lines
3025 3025
3026 mutex_lock(&ftrace_lock);3026 mutex_lock(&ftrace_lock);
3027 3027
3028 ret = proc_dointvec(table, write, file, buffer, lenp, ppos);3028 ret = proc_dointvec(table, write, buffer, lenp, ppos);
3029 3029
3030 if (ret || !write || (last_ftrace_enabled == !!ftrace_enabled))3030 if (ret || !write || (last_ftrace_enabled == !!ftrace_enabled))
3031 goto out;3031 goto out;
kernel/trace/trace_stack.c+2−2
@@ -296,14 +296,14 @@ static const struct file_operations stack_trace_fops = { · 295 unmodified lines
296 296
297int297int
298stack_trace_sysctl(struct ctl_table *table, int write,298stack_trace_sysctl(struct ctl_table *table, int write,
299 struct file *file, void __user *buffer, size_t *lenp,299 void __user *buffer, size_t *lenp,
300 loff_t *ppos)300 loff_t *ppos)
301{301{
302 int ret;302 int ret;
303 303
304 mutex_lock(&stack_sysctl_mutex);304 mutex_lock(&stack_sysctl_mutex);
305 305
306 ret = proc_dointvec(table, write, file, buffer, lenp, ppos);306 ret = proc_dointvec(table, write, buffer, lenp, ppos);
307 307
308 if (ret || !write ||308 if (ret || !write ||
309 (last_stack_tracer_enabled == !!stack_tracer_enabled))309 (last_stack_tracer_enabled == !!stack_tracer_enabled))
kernel/utsname_sysctl.c+2−2
@@ -42,14 +42,14 @@ static void put_uts(ctl_table *table, int write, void *which) · 41 unmodified lines
42 * Special case of dostring for the UTS structure. This has locks42 * Special case of dostring for the UTS structure. This has locks
43 * to observe. Should this be in kernel/sys.c ????43 * to observe. Should this be in kernel/sys.c ????
44 */44 */
45static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,45static int proc_do_uts_string(ctl_table *table, int write,
46 void __user *buffer, size_t *lenp, loff_t *ppos)46 void __user *buffer, size_t *lenp, loff_t *ppos)
47{47{
48 struct ctl_table uts_table;48 struct ctl_table uts_table;
49 int r;49 int r;
50 memcpy(&uts_table, table, sizeof(uts_table));50 memcpy(&uts_table, table, sizeof(uts_table));
51 uts_table.data = get_uts(table, write);51 uts_table.data = get_uts(table, write);
52 r = proc_dostring(&uts_table,write,filp,buffer,lenp, ppos);52 r = proc_dostring(&uts_table,write,buffer,lenp, ppos);
53 put_uts(table, write, uts_table.data);53 put_uts(table, write, uts_table.data);
54 return r;54 return r;
55}55}
mm/hugetlb.c+6−6
@@ -1537,7 +1537,7 @@ static unsigned int cpuset_mems_nr(unsigned int *array) · 1536 unmodified lines
1537 1537
1538#ifdef CONFIG_SYSCTL1538#ifdef CONFIG_SYSCTL
1539int hugetlb_sysctl_handler(struct ctl_table *table, int write,1539int hugetlb_sysctl_handler(struct ctl_table *table, int write,
1540 struct file *file, void __user *buffer,1540 void __user *buffer,
1541 size_t *length, loff_t *ppos)1541 size_t *length, loff_t *ppos)
1542{1542{
1543 struct hstate *h = &default_hstate;1543 struct hstate *h = &default_hstate;
@@ -1548,7 +1548,7 @@ int hugetlb_sysctl_handler(struct ctl_table *table, int write, · 4 unmodified lines
1548 1548
1549 table->data = &tmp;1549 table->data = &tmp;
1550 table->maxlen = sizeof(unsigned long);1550 table->maxlen = sizeof(unsigned long);
1551 proc_doulongvec_minmax(table, write, file, buffer, length, ppos);1551 proc_doulongvec_minmax(table, write, buffer, length, ppos);
1552 1552
1553 if (write)1553 if (write)
1554 h->max_huge_pages = set_max_huge_pages(h, tmp);1554 h->max_huge_pages = set_max_huge_pages(h, tmp);
@@ -1557,10 +1557,10 @@ int hugetlb_sysctl_handler(struct ctl_table *table, int write, · 2 unmodified lines
1557}1557}
1558 1558
1559int hugetlb_treat_movable_handler(struct ctl_table *table, int write,1559int hugetlb_treat_movable_handler(struct ctl_table *table, int write,
1560 struct file *file, void __user *buffer,1560 void __user *buffer,
1561 size_t *length, loff_t *ppos)1561 size_t *length, loff_t *ppos)
1562{1562{
1563 proc_dointvec(table, write, file, buffer, length, ppos);1563 proc_dointvec(table, write, buffer, length, ppos);
1564 if (hugepages_treat_as_movable)1564 if (hugepages_treat_as_movable)
1565 htlb_alloc_mask = GFP_HIGHUSER_MOVABLE;1565 htlb_alloc_mask = GFP_HIGHUSER_MOVABLE;
1566 else1566 else
@@ -1569,7 +1569,7 @@ int hugetlb_treat_movable_handler(struct ctl_table *table, int write, · 2 unmodified lines
1569}1569}
1570 1570
1571int hugetlb_overcommit_handler(struct ctl_table *table, int write,1571int hugetlb_overcommit_handler(struct ctl_table *table, int write,
1572 struct file *file, void __user *buffer,1572 void __user *buffer,
1573 size_t *length, loff_t *ppos)1573 size_t *length, loff_t *ppos)
1574{1574{
1575 struct hstate *h = &default_hstate;1575 struct hstate *h = &default_hstate;
@@ -1580,7 +1580,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write, · 4 unmodified lines
1580 1580
1581 table->data = &tmp;1581 table->data = &tmp;
1582 table->maxlen = sizeof(unsigned long);1582 table->maxlen = sizeof(unsigned long);
1583 proc_doulongvec_minmax(table, write, file, buffer, length, ppos);1583 proc_doulongvec_minmax(table, write, buffer, length, ppos);
1584 1584
1585 if (write) {1585 if (write) {
1586 spin_lock(&hugetlb_lock);1586 spin_lock(&hugetlb_lock);
mm/page-writeback.c+10−10
@@ -155,37 +155,37 @@ static void update_completion_period(void) · 154 unmodified lines
155}155}
156 156
157int dirty_background_ratio_handler(struct ctl_table *table, int write,157int dirty_background_ratio_handler(struct ctl_table *table, int write,
158 struct file *filp, void __user *buffer, size_t *lenp,158 void __user *buffer, size_t *lenp,
159 loff_t *ppos)159 loff_t *ppos)
160{160{
161 int ret;161 int ret;
162 162
163 ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);163 ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
164 if (ret == 0 && write)164 if (ret == 0 && write)
165 dirty_background_bytes = 0;165 dirty_background_bytes = 0;
166 return ret;166 return ret;
167}167}
168 168
169int dirty_background_bytes_handler(struct ctl_table *table, int write,169int dirty_background_bytes_handler(struct ctl_table *table, int write,
170 struct file *filp, void __user *buffer, size_t *lenp,170 void __user *buffer, size_t *lenp,
171 loff_t *ppos)171 loff_t *ppos)
172{172{
173 int ret;173 int ret;
174 174
175 ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);175 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
176 if (ret == 0 && write)176 if (ret == 0 && write)
177 dirty_background_ratio = 0;177 dirty_background_ratio = 0;
178 return ret;178 return ret;
179}179}
180 180
181int dirty_ratio_handler(struct ctl_table *table, int write,181int dirty_ratio_handler(struct ctl_table *table, int write,
182 struct file *filp, void __user *buffer, size_t *lenp,182 void __user *buffer, size_t *lenp,
183 loff_t *ppos)183 loff_t *ppos)
184{184{
185 int old_ratio = vm_dirty_ratio;185 int old_ratio = vm_dirty_ratio;
186 int ret;186 int ret;
187 187
188 ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);188 ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
189 if (ret == 0 && write && vm_dirty_ratio != old_ratio) {189 if (ret == 0 && write && vm_dirty_ratio != old_ratio) {
190 update_completion_period();190 update_completion_period();
191 vm_dirty_bytes = 0;191 vm_dirty_bytes = 0;
@@ -195,13 +195,13 @@ int dirty_ratio_handler(struct ctl_table *table, int write, · 3 unmodified lines
195 195
196 196
197int dirty_bytes_handler(struct ctl_table *table, int write,197int dirty_bytes_handler(struct ctl_table *table, int write,
198 struct file *filp, void __user *buffer, size_t *lenp,198 void __user *buffer, size_t *lenp,
199 loff_t *ppos)199 loff_t *ppos)
200{200{
201 unsigned long old_bytes = vm_dirty_bytes;201 unsigned long old_bytes = vm_dirty_bytes;
202 int ret;202 int ret;
203 203
204 ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);204 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
205 if (ret == 0 && write && vm_dirty_bytes != old_bytes) {205 if (ret == 0 && write && vm_dirty_bytes != old_bytes) {
206 update_completion_period();206 update_completion_period();
207 vm_dirty_ratio = 0;207 vm_dirty_ratio = 0;
@@ -686,9 +686,9 @@ static DEFINE_TIMER(laptop_mode_wb_timer, laptop_timer_fn, 0, 0); · 478 unmodified lines
686 * sysctl handler for /proc/sys/vm/dirty_writeback_centisecs686 * sysctl handler for /proc/sys/vm/dirty_writeback_centisecs
687 */687 */
688int dirty_writeback_centisecs_handler(ctl_table *table, int write,688int dirty_writeback_centisecs_handler(ctl_table *table, int write,
689 struct file *file, void __user *buffer, size_t *length, loff_t *ppos)689 void __user *buffer, size_t *length, loff_t *ppos)
690{690{
691 proc_dointvec(table, write, file, buffer, length, ppos);691 proc_dointvec(table, write, buffer, length, ppos);
692 return 0;692 return 0;
693}693}
694 694
mm/page_alloc.c+12−12
@@ -2373,7 +2373,7 @@ early_param("numa_zonelist_order", setup_numa_zonelist_order); · 2372 unmodified lines
2373 * sysctl handler for numa_zonelist_order2373 * sysctl handler for numa_zonelist_order
2374 */2374 */
2375int numa_zonelist_order_handler(ctl_table *table, int write,2375int numa_zonelist_order_handler(ctl_table *table, int write,
2376 struct file *file, void __user *buffer, size_t *length,2376 void __user *buffer, size_t *length,
2377 loff_t *ppos)2377 loff_t *ppos)
2378{2378{
2379 char saved_string[NUMA_ZONELIST_ORDER_LEN];2379 char saved_string[NUMA_ZONELIST_ORDER_LEN];
@@ -2382,7 +2382,7 @@ int numa_zonelist_order_handler(ctl_table *table, int write, · 2 unmodified lines
2382 if (write)2382 if (write)
2383 strncpy(saved_string, (char*)table->data,2383 strncpy(saved_string, (char*)table->data,
2384 NUMA_ZONELIST_ORDER_LEN);2384 NUMA_ZONELIST_ORDER_LEN);
2385 ret = proc_dostring(table, write, file, buffer, length, ppos);2385 ret = proc_dostring(table, write, buffer, length, ppos);
2386 if (ret)2386 if (ret)
2387 return ret;2387 return ret;
2388 if (write) {2388 if (write) {
@@ -4706,9 +4706,9 @@ module_init(init_per_zone_wmark_min) · 2317 unmodified lines
4706 * changes.4706 * changes.
4707 */4707 */
4708int min_free_kbytes_sysctl_handler(ctl_table *table, int write, 4708int min_free_kbytes_sysctl_handler(ctl_table *table, int write,
4709 struct file *file, void __user *buffer, size_t *length, loff_t *ppos)4709 void __user *buffer, size_t *length, loff_t *ppos)
4710{4710{
4711 proc_dointvec(table, write, file, buffer, length, ppos);4711 proc_dointvec(table, write, buffer, length, ppos);
4712 if (write)4712 if (write)
4713 setup_per_zone_wmarks();4713 setup_per_zone_wmarks();
4714 return 0;4714 return 0;
@@ -4716,12 +4716,12 @@ int min_free_kbytes_sysctl_handler(ctl_table *table, int write, · 1 unmodified line
4716 4716
4717#ifdef CONFIG_NUMA4717#ifdef CONFIG_NUMA
4718int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write,4718int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write,
4719 struct file *file, void __user *buffer, size_t *length, loff_t *ppos)4719 void __user *buffer, size_t *length, loff_t *ppos)
4720{4720{
4721 struct zone *zone;4721 struct zone *zone;
4722 int rc;4722 int rc;
4723 4723
4724 rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos);4724 rc = proc_dointvec_minmax(table, write, buffer, length, ppos);
4725 if (rc)4725 if (rc)
4726 return rc;4726 return rc;
4727 4727
@@ -4732,12 +4732,12 @@ int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write, · 4 unmodified lines
4732}4732}
4733 4733
4734int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write,4734int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write,
4735 struct file *file, void __user *buffer, size_t *length, loff_t *ppos)4735 void __user *buffer, size_t *length, loff_t *ppos)
4736{4736{
4737 struct zone *zone;4737 struct zone *zone;
4738 int rc;4738 int rc;
4739 4739
4740 rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos);4740 rc = proc_dointvec_minmax(table, write, buffer, length, ppos);
4741 if (rc)4741 if (rc)
4742 return rc;4742 return rc;
4743 4743
@@ -4758,9 +4758,9 @@ int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write, · 14 unmodified lines
4758 * if in function of the boot time zone sizes.4758 * if in function of the boot time zone sizes.
4759 */4759 */
4760int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write,4760int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write,
4761 struct file *file, void __user *buffer, size_t *length, loff_t *ppos)4761 void __user *buffer, size_t *length, loff_t *ppos)
4762{4762{
4763 proc_dointvec_minmax(table, write, file, buffer, length, ppos);4763 proc_dointvec_minmax(table, write, buffer, length, ppos);
4764 setup_per_zone_lowmem_reserve();4764 setup_per_zone_lowmem_reserve();
4765 return 0;4765 return 0;
4766}4766}
@@ -4772,13 +4772,13 @@ int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write, · 5 unmodified lines
4772 */4772 */
4773 4773
4774int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,4774int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,
4775 struct file *file, void __user *buffer, size_t *length, loff_t *ppos)4775 void __user *buffer, size_t *length, loff_t *ppos)
4776{4776{
4777 struct zone *zone;4777 struct zone *zone;
4778 unsigned int cpu;4778 unsigned int cpu;
4779 int ret;4779 int ret;
4780 4780
4781 ret = proc_dointvec_minmax(table, write, file, buffer, length, ppos);4781 ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
4782 if (!write || (ret == -EINVAL))4782 if (!write || (ret == -EINVAL))
4783 return ret;4783 return ret;
4784 for_each_populated_zone(zone) {4784 for_each_populated_zone(zone) {
mm/vmscan.c+2−2
@@ -2844,10 +2844,10 @@ static void scan_all_zones_unevictable_pages(void) · 2843 unmodified lines
2844unsigned long scan_unevictable_pages;2844unsigned long scan_unevictable_pages;
2845 2845
2846int scan_unevictable_handler(struct ctl_table *table, int write,2846int scan_unevictable_handler(struct ctl_table *table, int write,
2847 struct file *file, void __user *buffer,2847 void __user *buffer,
2848 size_t *length, loff_t *ppos)2848 size_t *length, loff_t *ppos)
2849{2849{
2850 proc_doulongvec_minmax(table, write, file, buffer, length, ppos);2850 proc_doulongvec_minmax(table, write, buffer, length, ppos);
2851 2851
2852 if (write && *(unsigned long *)table->data)2852 if (write && *(unsigned long *)table->data)
2853 scan_all_zones_unevictable_pages();2853 scan_all_zones_unevictable_pages();
net/bridge/br_netfilter.c+2−2
@@ -965,12 +965,12 @@ static struct nf_hook_ops br_nf_ops[] __read_mostly = { · 964 unmodified lines
965 965
966#ifdef CONFIG_SYSCTL966#ifdef CONFIG_SYSCTL
967static967static
968int brnf_sysctl_call_tables(ctl_table * ctl, int write, struct file *filp,968int brnf_sysctl_call_tables(ctl_table * ctl, int write,
969 void __user * buffer, size_t * lenp, loff_t * ppos)969 void __user * buffer, size_t * lenp, loff_t * ppos)
970{970{
971 int ret;971 int ret;
972 972
973 ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);973 ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
974 974
975 if (write && *(int *)(ctl->data))975 if (write && *(int *)(ctl->data))
976 *(int *)(ctl->data) = 1;976 *(int *)(ctl->data) = 1;
net/decnet/dn_dev.c+2−3
@@ -164,7 +164,7 @@ static int max_t3[] = { 8191 }; /* Must fit in 16 bits when multiplied by BCT3MU · 163 unmodified lines
164static int min_priority[1];164static int min_priority[1];
165static int max_priority[] = { 127 }; /* From DECnet spec */165static int max_priority[] = { 127 }; /* From DECnet spec */
166 166
167static int dn_forwarding_proc(ctl_table *, int, struct file *,167static int dn_forwarding_proc(ctl_table *, int,
168 void __user *, size_t *, loff_t *);168 void __user *, size_t *, loff_t *);
169static int dn_forwarding_sysctl(ctl_table *table,169static int dn_forwarding_sysctl(ctl_table *table,
170 void __user *oldval, size_t __user *oldlenp,170 void __user *oldval, size_t __user *oldlenp,
@@ -274,7 +274,6 @@ static void dn_dev_sysctl_unregister(struct dn_dev_parms *parms) · 103 unmodified lines
274}274}
275 275
276static int dn_forwarding_proc(ctl_table *table, int write,276static int dn_forwarding_proc(ctl_table *table, int write,
277 struct file *filep,
278 void __user *buffer,277 void __user *buffer,
279 size_t *lenp, loff_t *ppos)278 size_t *lenp, loff_t *ppos)
280{279{
@@ -290,7 +289,7 @@ static int dn_forwarding_proc(ctl_table *table, int write, · 9 unmodified lines
290 dn_db = dev->dn_ptr;289 dn_db = dev->dn_ptr;
291 old = dn_db->parms.forwarding;290 old = dn_db->parms.forwarding;
292 291
293 err = proc_dointvec(table, write, filep, buffer, lenp, ppos);292 err = proc_dointvec(table, write, buffer, lenp, ppos);
294 293
295 if ((err >= 0) && write) {294 if ((err >= 0) && write) {
296 if (dn_db->parms.forwarding < 0)295 if (dn_db->parms.forwarding < 0)
net/decnet/sysctl_net_decnet.c+0−2
@@ -165,7 +165,6 @@ static int dn_node_address_strategy(ctl_table *table, · 164 unmodified lines
165}165}
166 166
167static int dn_node_address_handler(ctl_table *table, int write,167static int dn_node_address_handler(ctl_table *table, int write,
168 struct file *filp,
169 void __user *buffer,168 void __user *buffer,
170 size_t *lenp, loff_t *ppos)169 size_t *lenp, loff_t *ppos)
171{170{
@@ -276,7 +275,6 @@ static int dn_def_dev_strategy(ctl_table *table, · 104 unmodified lines
276 275
277 276
278static int dn_def_dev_handler(ctl_table *table, int write,277static int dn_def_dev_handler(ctl_table *table, int write,
279 struct file * filp,
280 void __user *buffer,278 void __user *buffer,
281 size_t *lenp, loff_t *ppos)279 size_t *lenp, loff_t *ppos)
282{280{
net/ipv4/devinet.c+6−6
@@ -1270,10 +1270,10 @@ static void inet_forward_change(struct net *net) · 1269 unmodified lines
1270}1270}
1271 1271
1272static int devinet_conf_proc(ctl_table *ctl, int write,1272static int devinet_conf_proc(ctl_table *ctl, int write,
1273 struct file *filp, void __user *buffer,1273 void __user *buffer,
1274 size_t *lenp, loff_t *ppos)1274 size_t *lenp, loff_t *ppos)
1275{1275{
1276 int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);1276 int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
1277 1277
1278 if (write) {1278 if (write) {
1279 struct ipv4_devconf *cnf = ctl->extra1;1279 struct ipv4_devconf *cnf = ctl->extra1;
@@ -1342,12 +1342,12 @@ static int devinet_conf_sysctl(ctl_table *table, · 62 unmodified lines
1342}1342}
1343 1343
1344static int devinet_sysctl_forward(ctl_table *ctl, int write,1344static int devinet_sysctl_forward(ctl_table *ctl, int write,
1345 struct file *filp, void __user *buffer,1345 void __user *buffer,
1346 size_t *lenp, loff_t *ppos)1346 size_t *lenp, loff_t *ppos)
1347{1347{
1348 int *valp = ctl->data;1348 int *valp = ctl->data;
1349 int val = *valp;1349 int val = *valp;
1350 int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);1350 int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
1351 1351
1352 if (write && *valp != val) {1352 if (write && *valp != val) {
1353 struct net *net = ctl->extra2;1353 struct net *net = ctl->extra2;
@@ -1372,12 +1372,12 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write, · 18 unmodified lines
1372}1372}
1373 1373
1374int ipv4_doint_and_flush(ctl_table *ctl, int write,1374int ipv4_doint_and_flush(ctl_table *ctl, int write,
1375 struct file *filp, void __user *buffer,1375 void __user *buffer,
1376 size_t *lenp, loff_t *ppos)1376 size_t *lenp, loff_t *ppos)
1377{1377{
1378 int *valp = ctl->data;1378 int *valp = ctl->data;
1379 int val = *valp;1379 int val = *valp;
1380 int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);1380 int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
1381 struct net *net = ctl->extra2;1381 struct net *net = ctl->extra2;
1382 1382
1383 if (write && *valp != val)1383 if (write && *valp != val)
net/ipv4/route.c+3−4
@@ -3036,7 +3036,7 @@ void ip_rt_multicast_event(struct in_device *in_dev) · 3035 unmodified lines
3036 3036
3037#ifdef CONFIG_SYSCTL3037#ifdef CONFIG_SYSCTL
3038static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write,3038static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write,
3039 struct file *filp, void __user *buffer,3039 void __user *buffer,
3040 size_t *lenp, loff_t *ppos)3040 size_t *lenp, loff_t *ppos)
3041{3041{
3042 if (write) {3042 if (write) {
@@ -3046,7 +3046,7 @@ static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, · 3 unmodified lines
3046 3046
3047 memcpy(&ctl, __ctl, sizeof(ctl));3047 memcpy(&ctl, __ctl, sizeof(ctl));
3048 ctl.data = &flush_delay;3048 ctl.data = &flush_delay;
3049 proc_dointvec(&ctl, write, filp, buffer, lenp, ppos);3049 proc_dointvec(&ctl, write, buffer, lenp, ppos);
3050 3050
3051 net = (struct net *)__ctl->extra1;3051 net = (struct net *)__ctl->extra1;
3052 rt_cache_flush(net, flush_delay);3052 rt_cache_flush(net, flush_delay);
@@ -3106,12 +3106,11 @@ static void rt_secret_reschedule(int old) · 53 unmodified lines
3106}3106}
3107 3107
3108static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write,3108static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write,
3109 struct file *filp,
3110 void __user *buffer, size_t *lenp,3109 void __user *buffer, size_t *lenp,
3111 loff_t *ppos)3110 loff_t *ppos)
3112{3111{
3113 int old = ip_rt_secret_interval;3112 int old = ip_rt_secret_interval;
3114 int ret = proc_dointvec_jiffies(ctl, write, filp, buffer, lenp, ppos);3113 int ret = proc_dointvec_jiffies(ctl, write, buffer, lenp, ppos);
3115 3114
3116 rt_secret_reschedule(old);3115 rt_secret_reschedule(old);
3117 3116
net/ipv4/sysctl_net_ipv4.c+8−8
@@ -36,7 +36,7 @@ static void set_local_port_range(int range[2]) · 35 unmodified lines
36}36}
37 37
38/* Validate changes from /proc interface. */38/* Validate changes from /proc interface. */
39static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp,39static int ipv4_local_port_range(ctl_table *table, int write,
40 void __user *buffer,40 void __user *buffer,
41 size_t *lenp, loff_t *ppos)41 size_t *lenp, loff_t *ppos)
42{42{
@@ -51,7 +51,7 @@ static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp, · 8 unmodified lines
51 };51 };
52 52
53 inet_get_local_port_range(range, range + 1);53 inet_get_local_port_range(range, range + 1);
54 ret = proc_dointvec_minmax(&tmp, write, filp, buffer, lenp, ppos);54 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos);
55 55
56 if (write && ret == 0) {56 if (write && ret == 0) {
57 if (range[1] < range[0])57 if (range[1] < range[0])
@@ -91,7 +91,7 @@ static int ipv4_sysctl_local_port_range(ctl_table *table, · 33 unmodified lines
91}91}
92 92
93 93
94static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * filp,94static int proc_tcp_congestion_control(ctl_table *ctl, int write,
95 void __user *buffer, size_t *lenp, loff_t *ppos)95 void __user *buffer, size_t *lenp, loff_t *ppos)
96{96{
97 char val[TCP_CA_NAME_MAX];97 char val[TCP_CA_NAME_MAX];
@@ -103,7 +103,7 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * · 5 unmodified lines
103 103
104 tcp_get_default_congestion_control(val);104 tcp_get_default_congestion_control(val);
105 105
106 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos);106 ret = proc_dostring(&tbl, write, buffer, lenp, ppos);
107 if (write && ret == 0)107 if (write && ret == 0)
108 ret = tcp_set_default_congestion_control(val);108 ret = tcp_set_default_congestion_control(val);
109 return ret;109 return ret;
@@ -129,7 +129,7 @@ static int sysctl_tcp_congestion_control(ctl_table *table, · 19 unmodified lines
129}129}
130 130
131static int proc_tcp_available_congestion_control(ctl_table *ctl,131static int proc_tcp_available_congestion_control(ctl_table *ctl,
132 int write, struct file * filp,132 int write,
133 void __user *buffer, size_t *lenp,133 void __user *buffer, size_t *lenp,
134 loff_t *ppos)134 loff_t *ppos)
135{135{
@@ -140,13 +140,13 @@ static int proc_tcp_available_congestion_control(ctl_table *ctl, · 4 unmodified lines
140 if (!tbl.data)140 if (!tbl.data)
141 return -ENOMEM;141 return -ENOMEM;
142 tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX);142 tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX);
143 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos);143 ret = proc_dostring(&tbl, write, buffer, lenp, ppos);
144 kfree(tbl.data);144 kfree(tbl.data);
145 return ret;145 return ret;
146}146}
147 147
148static int proc_allowed_congestion_control(ctl_table *ctl,148static int proc_allowed_congestion_control(ctl_table *ctl,
149 int write, struct file * filp,149 int write,
150 void __user *buffer, size_t *lenp,150 void __user *buffer, size_t *lenp,
151 loff_t *ppos)151 loff_t *ppos)
152{152{
@@ -158,7 +158,7 @@ static int proc_allowed_congestion_control(ctl_table *ctl, · 5 unmodified lines
158 return -ENOMEM;158 return -ENOMEM;
159 159
160 tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen);160 tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen);
161 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos);161 ret = proc_dostring(&tbl, write, buffer, lenp, ppos);
162 if (write && ret == 0)162 if (write && ret == 0)
163 ret = tcp_set_allowed_congestion_control(tbl.data);163 ret = tcp_set_allowed_congestion_control(tbl.data);
164 kfree(tbl.data);164 kfree(tbl.data);
net/ipv6/addrconf.c+4−4
@@ -3986,14 +3986,14 @@ static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) · 3985 unmodified lines
3986#ifdef CONFIG_SYSCTL3986#ifdef CONFIG_SYSCTL
3987 3987
3988static3988static
3989int addrconf_sysctl_forward(ctl_table *ctl, int write, struct file * filp,3989int addrconf_sysctl_forward(ctl_table *ctl, int write,
3990 void __user *buffer, size_t *lenp, loff_t *ppos)3990 void __user *buffer, size_t *lenp, loff_t *ppos)
3991{3991{
3992 int *valp = ctl->data;3992 int *valp = ctl->data;
3993 int val = *valp;3993 int val = *valp;
3994 int ret;3994 int ret;
3995 3995
3996 ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);3996 ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
3997 3997
3998 if (write)3998 if (write)
3999 ret = addrconf_fixup_forwarding(ctl, valp, val);3999 ret = addrconf_fixup_forwarding(ctl, valp, val);
@@ -4090,14 +4090,14 @@ static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int old) · 90 unmodified lines
4090}4090}
4091 4091
4092static4092static
4093int addrconf_sysctl_disable(ctl_table *ctl, int write, struct file * filp,4093int addrconf_sysctl_disable(ctl_table *ctl, int write,
4094 void __user *buffer, size_t *lenp, loff_t *ppos)4094 void __user *buffer, size_t *lenp, loff_t *ppos)
4095{4095{
4096 int *valp = ctl->data;4096 int *valp = ctl->data;
4097 int val = *valp;4097 int val = *valp;
4098 int ret;4098 int ret;
4099 4099
4100 ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);4100 ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
4101 4101
4102 if (write)4102 if (write)
4103 ret = addrconf_disable_ipv6(ctl, valp, val);4103 ret = addrconf_disable_ipv6(ctl, valp, val);
net/ipv6/ndisc.c+4−4
@@ -1735,7 +1735,7 @@ static void ndisc_warn_deprecated_sysctl(struct ctl_table *ctl, · 1734 unmodified lines
1735 }1735 }
1736}1736}
1737 1737
1738int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * filp, void __user *buffer, size_t *lenp, loff_t *ppos)1738int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
1739{1739{
1740 struct net_device *dev = ctl->extra1;1740 struct net_device *dev = ctl->extra1;
1741 struct inet6_dev *idev;1741 struct inet6_dev *idev;
@@ -1746,16 +1746,16 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f · 4 unmodified lines
1746 ndisc_warn_deprecated_sysctl(ctl, "syscall", dev ? dev->name : "default");1746 ndisc_warn_deprecated_sysctl(ctl, "syscall", dev ? dev->name : "default");
1747 1747
1748 if (strcmp(ctl->procname, "retrans_time") == 0)1748 if (strcmp(ctl->procname, "retrans_time") == 0)
1749 ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);1749 ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
1750 1750
1751 else if (strcmp(ctl->procname, "base_reachable_time") == 0)1751 else if (strcmp(ctl->procname, "base_reachable_time") == 0)
1752 ret = proc_dointvec_jiffies(ctl, write,1752 ret = proc_dointvec_jiffies(ctl, write,
1753 filp, buffer, lenp, ppos);1753 buffer, lenp, ppos);
1754 1754
1755 else if ((strcmp(ctl->procname, "retrans_time_ms") == 0) ||1755 else if ((strcmp(ctl->procname, "retrans_time_ms") == 0) ||
1756 (strcmp(ctl->procname, "base_reachable_time_ms") == 0))1756 (strcmp(ctl->procname, "base_reachable_time_ms") == 0))
1757 ret = proc_dointvec_ms_jiffies(ctl, write,1757 ret = proc_dointvec_ms_jiffies(ctl, write,
1758 filp, buffer, lenp, ppos);1758 buffer, lenp, ppos);
1759 else1759 else
1760 ret = -1;1760 ret = -1;
1761 1761
net/ipv6/route.c+2−2
@@ -2524,13 +2524,13 @@ static const struct file_operations rt6_stats_seq_fops = { · 2523 unmodified lines
2524#ifdef CONFIG_SYSCTL2524#ifdef CONFIG_SYSCTL
2525 2525
2526static2526static
2527int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, struct file * filp,2527int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write,
2528 void __user *buffer, size_t *lenp, loff_t *ppos)2528 void __user *buffer, size_t *lenp, loff_t *ppos)
2529{2529{
2530 struct net *net = current->nsproxy->net_ns;2530 struct net *net = current->nsproxy->net_ns;
2531 int delay = net->ipv6.sysctl.flush_delay;2531 int delay = net->ipv6.sysctl.flush_delay;
2532 if (write) {2532 if (write) {
2533 proc_dointvec(ctl, write, filp, buffer, lenp, ppos);2533 proc_dointvec(ctl, write, buffer, lenp, ppos);
2534 fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net);2534 fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net);
2535 return 0;2535 return 0;
2536 } else2536 } else
net/irda/irsysctl.c+4−4
@@ -73,12 +73,12 @@ static int min_lap_keepalive_time = 100; /* 100us */ · 72 unmodified lines
73/* For other sysctl, I've no idea of the range. Maybe Dag could help73/* For other sysctl, I've no idea of the range. Maybe Dag could help
74 * us on that - Jean II */74 * us on that - Jean II */
75 75
76static int do_devname(ctl_table *table, int write, struct file *filp,76static int do_devname(ctl_table *table, int write,
77 void __user *buffer, size_t *lenp, loff_t *ppos)77 void __user *buffer, size_t *lenp, loff_t *ppos)
78{78{
79 int ret;79 int ret;
80 80
81 ret = proc_dostring(table, write, filp, buffer, lenp, ppos);81 ret = proc_dostring(table, write, buffer, lenp, ppos);
82 if (ret == 0 && write) {82 if (ret == 0 && write) {
83 struct ias_value *val;83 struct ias_value *val;
84 84
@@ -90,12 +90,12 @@ static int do_devname(ctl_table *table, int write, struct file *filp, · 5 unmodified lines
90}90}
91 91
92 92
93static int do_discovery(ctl_table *table, int write, struct file *filp,93static int do_discovery(ctl_table *table, int write,
94 void __user *buffer, size_t *lenp, loff_t *ppos)94 void __user *buffer, size_t *lenp, loff_t *ppos)
95{95{
96 int ret;96 int ret;
97 97
98 ret = proc_dointvec(table, write, filp, buffer, lenp, ppos);98 ret = proc_dointvec(table, write, buffer, lenp, ppos);
99 if (ret)99 if (ret)
100 return ret;100 return ret;
101 101
net/netfilter/ipvs/ip_vs_ctl.c+4−4
@@ -1496,14 +1496,14 @@ static int ip_vs_zero_all(void) · 1495 unmodified lines
1496 1496
1497 1497
1498static int1498static int
1499proc_do_defense_mode(ctl_table *table, int write, struct file * filp,1499proc_do_defense_mode(ctl_table *table, int write,
1500 void __user *buffer, size_t *lenp, loff_t *ppos)1500 void __user *buffer, size_t *lenp, loff_t *ppos)
1501{1501{
1502 int *valp = table->data;1502 int *valp = table->data;
1503 int val = *valp;1503 int val = *valp;
1504 int rc;1504 int rc;
1505 1505
1506 rc = proc_dointvec(table, write, filp, buffer, lenp, ppos);1506 rc = proc_dointvec(table, write, buffer, lenp, ppos);
1507 if (write && (*valp != val)) {1507 if (write && (*valp != val)) {
1508 if ((*valp < 0) || (*valp > 3)) {1508 if ((*valp < 0) || (*valp > 3)) {
1509 /* Restore the correct value */1509 /* Restore the correct value */
@@ -1517,7 +1517,7 @@ proc_do_defense_mode(ctl_table *table, int write, struct file * filp, · 7 unmodified lines
1517 1517
1518 1518
1519static int1519static int
1520proc_do_sync_threshold(ctl_table *table, int write, struct file *filp,1520proc_do_sync_threshold(ctl_table *table, int write,
1521 void __user *buffer, size_t *lenp, loff_t *ppos)1521 void __user *buffer, size_t *lenp, loff_t *ppos)
1522{1522{
1523 int *valp = table->data;1523 int *valp = table->data;
@@ -1527,7 +1527,7 @@ proc_do_sync_threshold(ctl_table *table, int write, struct file *filp, · 3 unmodified lines
1527 /* backup the value first */1527 /* backup the value first */
1528 memcpy(val, valp, sizeof(val));1528 memcpy(val, valp, sizeof(val));
1529 1529
1530 rc = proc_dointvec(table, write, filp, buffer, lenp, ppos);1530 rc = proc_dointvec(table, write, buffer, lenp, ppos);
1531 if (write && (valp[0] < 0 || valp[1] < 0 || valp[0] >= valp[1])) {1531 if (write && (valp[0] < 0 || valp[1] < 0 || valp[0] >= valp[1])) {
1532 /* Restore the correct value */1532 /* Restore the correct value */
1533 memcpy(valp, val, sizeof(val));1533 memcpy(valp, val, sizeof(val));
net/netfilter/nf_log.c+2−2
@@ -226,7 +226,7 @@ static char nf_log_sysctl_fnames[NFPROTO_NUMPROTO-NFPROTO_UNSPEC][3]; · 225 unmodified lines
226static struct ctl_table nf_log_sysctl_table[NFPROTO_NUMPROTO+1];226static struct ctl_table nf_log_sysctl_table[NFPROTO_NUMPROTO+1];
227static struct ctl_table_header *nf_log_dir_header;227static struct ctl_table_header *nf_log_dir_header;
228 228
229static int nf_log_proc_dostring(ctl_table *table, int write, struct file *filp,229static int nf_log_proc_dostring(ctl_table *table, int write,
230 void __user *buffer, size_t *lenp, loff_t *ppos)230 void __user *buffer, size_t *lenp, loff_t *ppos)
231{231{
232 const struct nf_logger *logger;232 const struct nf_logger *logger;
@@ -260,7 +260,7 @@ static int nf_log_proc_dostring(ctl_table *table, int write, struct file *filp, · 27 unmodified lines
260 table->data = "NONE";260 table->data = "NONE";
261 else261 else
262 table->data = logger->name;262 table->data = logger->name;
263 r = proc_dostring(table, write, filp, buffer, lenp, ppos);263 r = proc_dostring(table, write, buffer, lenp, ppos);
264 mutex_unlock(&nf_log_mutex);264 mutex_unlock(&nf_log_mutex);
265 }265 }
266 266
net/phonet/sysctl.c+2−2
@@ -56,7 +56,7 @@ void phonet_get_local_port_range(int *min, int *max) · 55 unmodified lines
56 } while (read_seqretry(&local_port_range_lock, seq));56 } while (read_seqretry(&local_port_range_lock, seq));
57}57}
58 58
59static int proc_local_port_range(ctl_table *table, int write, struct file *filp,59static int proc_local_port_range(ctl_table *table, int write,
60 void __user *buffer,60 void __user *buffer,
61 size_t *lenp, loff_t *ppos)61 size_t *lenp, loff_t *ppos)
62{62{
@@ -70,7 +70,7 @@ static int proc_local_port_range(ctl_table *table, int write, struct file *filp, · 7 unmodified lines
70 .extra2 = &local_port_range_max,70 .extra2 = &local_port_range_max,
71 };71 };
72 72
73 ret = proc_dointvec_minmax(&tmp, write, filp, buffer, lenp, ppos);73 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos);
74 74
75 if (write && ret == 0) {75 if (write && ret == 0) {
76 if (range[1] < range[0])76 if (range[1] < range[0])
net/sunrpc/sysctl.c+2−2
@@ -56,7 +56,7 @@ rpc_unregister_sysctl(void) · 55 unmodified lines
56 }56 }
57}57}
58 58
59static int proc_do_xprt(ctl_table *table, int write, struct file *file,59static int proc_do_xprt(ctl_table *table, int write,
60 void __user *buffer, size_t *lenp, loff_t *ppos)60 void __user *buffer, size_t *lenp, loff_t *ppos)
61{61{
62 char tmpbuf[256];62 char tmpbuf[256];
@@ -71,7 +71,7 @@ static int proc_do_xprt(ctl_table *table, int write, struct file *file, · 8 unmodified lines
71}71}
72 72
73static int73static int
74proc_dodebug(ctl_table *table, int write, struct file *file,74proc_dodebug(ctl_table *table, int write,
75 void __user *buffer, size_t *lenp, loff_t *ppos)75 void __user *buffer, size_t *lenp, loff_t *ppos)
76{76{
77 char tmpbuf[20], c, *s;77 char tmpbuf[20], c, *s;
net/sunrpc/xprtrdma/svc_rdma.c+1−1
@@ -80,7 +80,7 @@ struct kmem_cache *svc_rdma_ctxt_cachep; · 79 unmodified lines
80 * current value.80 * current value.
81 */81 */
82static int read_reset_stat(ctl_table *table, int write,82static int read_reset_stat(ctl_table *table, int write,
83 struct file *filp, void __user *buffer, size_t *lenp,83 void __user *buffer, size_t *lenp,
84 loff_t *ppos)84 loff_t *ppos)
85{85{
86 atomic_t *stat = (atomic_t *)table->data;86 atomic_t *stat = (atomic_t *)table->data;
security/min_addr.c+2−2
@@ -28,12 +28,12 @@ static void update_mmap_min_addr(void) · 27 unmodified lines
28 * sysctl handler which just sets dac_mmap_min_addr = the new value and then28 * sysctl handler which just sets dac_mmap_min_addr = the new value and then
29 * calls update_mmap_min_addr() so non MAP_FIXED hints get rounded properly29 * calls update_mmap_min_addr() so non MAP_FIXED hints get rounded properly
30 */30 */
31int mmap_min_addr_handler(struct ctl_table *table, int write, struct file *filp,31int mmap_min_addr_handler(struct ctl_table *table, int write,
32 void __user *buffer, size_t *lenp, loff_t *ppos)32 void __user *buffer, size_t *lenp, loff_t *ppos)
33{33{
34 int ret;34 int ret;
35 35
36 ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);36 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
37 37
38 update_mmap_min_addr();38 update_mmap_min_addr();
39 39