aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c163
1 files changed, 105 insertions, 58 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 3125cff1c570..0d949c517412 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -26,7 +26,6 @@
26#include <linux/proc_fs.h> 26#include <linux/proc_fs.h>
27#include <linux/security.h> 27#include <linux/security.h>
28#include <linux/ctype.h> 28#include <linux/ctype.h>
29#include <linux/utsname.h>
30#include <linux/kmemcheck.h> 29#include <linux/kmemcheck.h>
31#include <linux/smp_lock.h> 30#include <linux/smp_lock.h>
32#include <linux/fs.h> 31#include <linux/fs.h>
@@ -50,7 +49,7 @@
50#include <linux/reboot.h> 49#include <linux/reboot.h>
51#include <linux/ftrace.h> 50#include <linux/ftrace.h>
52#include <linux/slow-work.h> 51#include <linux/slow-work.h>
53#include <linux/perf_counter.h> 52#include <linux/perf_event.h>
54 53
55#include <asm/uaccess.h> 54#include <asm/uaccess.h>
56#include <asm/processor.h> 55#include <asm/processor.h>
@@ -77,6 +76,7 @@ extern int max_threads;
77extern int core_uses_pid; 76extern int core_uses_pid;
78extern int suid_dumpable; 77extern int suid_dumpable;
79extern char core_pattern[]; 78extern char core_pattern[];
79extern unsigned int core_pipe_limit;
80extern int pid_max; 80extern int pid_max;
81extern int min_free_kbytes; 81extern int min_free_kbytes;
82extern int pid_max_min, pid_max_max; 82extern int pid_max_min, pid_max_max;
@@ -91,6 +91,9 @@ extern int sysctl_nr_trim_pages;
91#ifdef CONFIG_RCU_TORTURE_TEST 91#ifdef CONFIG_RCU_TORTURE_TEST
92extern int rcutorture_runnable; 92extern int rcutorture_runnable;
93#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ 93#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
94#ifdef CONFIG_BLOCK
95extern int blk_iopoll_enabled;
96#endif
94 97
95/* Constants used for minimum and maximum */ 98/* Constants used for minimum and maximum */
96#ifdef CONFIG_DETECT_SOFTLOCKUP 99#ifdef CONFIG_DETECT_SOFTLOCKUP
@@ -103,6 +106,9 @@ static int __maybe_unused one = 1;
103static int __maybe_unused two = 2; 106static int __maybe_unused two = 2;
104static unsigned long one_ul = 1; 107static unsigned long one_ul = 1;
105static int one_hundred = 100; 108static int one_hundred = 100;
109#ifdef CONFIG_PRINTK
110static int ten_thousand = 10000;
111#endif
106 112
107/* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */ 113/* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
108static unsigned long dirty_bytes_min = 2 * PAGE_SIZE; 114static unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
@@ -157,9 +163,9 @@ extern int max_lock_depth;
157#endif 163#endif
158 164
159#ifdef CONFIG_PROC_SYSCTL 165#ifdef CONFIG_PROC_SYSCTL
160static 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,
161 void __user *buffer, size_t *lenp, loff_t *ppos); 167 void __user *buffer, size_t *lenp, loff_t *ppos);
162static int proc_taint(struct ctl_table *table, int write, struct file *filp, 168static int proc_taint(struct ctl_table *table, int write,
163 void __user *buffer, size_t *lenp, loff_t *ppos); 169 void __user *buffer, size_t *lenp, loff_t *ppos);
164#endif 170#endif
165 171
@@ -418,6 +424,14 @@ static struct ctl_table kern_table[] = {
418 .proc_handler = &proc_dostring, 424 .proc_handler = &proc_dostring,
419 .strategy = &sysctl_string, 425 .strategy = &sysctl_string,
420 }, 426 },
427 {
428 .ctl_name = CTL_UNNUMBERED,
429 .procname = "core_pipe_limit",
430 .data = &core_pipe_limit,
431 .maxlen = sizeof(unsigned int),
432 .mode = 0644,
433 .proc_handler = &proc_dointvec,
434 },
421#ifdef CONFIG_PROC_SYSCTL 435#ifdef CONFIG_PROC_SYSCTL
422 { 436 {
423 .procname = "tainted", 437 .procname = "tainted",
@@ -719,6 +733,17 @@ static struct ctl_table kern_table[] = {
719 .mode = 0644, 733 .mode = 0644,
720 .proc_handler = &proc_dointvec, 734 .proc_handler = &proc_dointvec,
721 }, 735 },
736 {
737 .ctl_name = CTL_UNNUMBERED,
738 .procname = "printk_delay",
739 .data = &printk_delay_msec,
740 .maxlen = sizeof(int),
741 .mode = 0644,
742 .proc_handler = &proc_dointvec_minmax,
743 .strategy = &sysctl_intvec,
744 .extra1 = &zero,
745 .extra2 = &ten_thousand,
746 },
722#endif 747#endif
723 { 748 {
724 .ctl_name = KERN_NGROUPS_MAX, 749 .ctl_name = KERN_NGROUPS_MAX,
@@ -961,28 +986,28 @@ static struct ctl_table kern_table[] = {
961 .child = slow_work_sysctls, 986 .child = slow_work_sysctls,
962 }, 987 },
963#endif 988#endif
964#ifdef CONFIG_PERF_COUNTERS 989#ifdef CONFIG_PERF_EVENTS
965 { 990 {
966 .ctl_name = CTL_UNNUMBERED, 991 .ctl_name = CTL_UNNUMBERED,
967 .procname = "perf_counter_paranoid", 992 .procname = "perf_event_paranoid",
968 .data = &sysctl_perf_counter_paranoid, 993 .data = &sysctl_perf_event_paranoid,
969 .maxlen = sizeof(sysctl_perf_counter_paranoid), 994 .maxlen = sizeof(sysctl_perf_event_paranoid),
970 .mode = 0644, 995 .mode = 0644,
971 .proc_handler = &proc_dointvec, 996 .proc_handler = &proc_dointvec,
972 }, 997 },
973 { 998 {
974 .ctl_name = CTL_UNNUMBERED, 999 .ctl_name = CTL_UNNUMBERED,
975 .procname = "perf_counter_mlock_kb", 1000 .procname = "perf_event_mlock_kb",
976 .data = &sysctl_perf_counter_mlock, 1001 .data = &sysctl_perf_event_mlock,
977 .maxlen = sizeof(sysctl_perf_counter_mlock), 1002 .maxlen = sizeof(sysctl_perf_event_mlock),
978 .mode = 0644, 1003 .mode = 0644,
979 .proc_handler = &proc_dointvec, 1004 .proc_handler = &proc_dointvec,
980 }, 1005 },
981 { 1006 {
982 .ctl_name = CTL_UNNUMBERED, 1007 .ctl_name = CTL_UNNUMBERED,
983 .procname = "perf_counter_max_sample_rate", 1008 .procname = "perf_event_max_sample_rate",
984 .data = &sysctl_perf_counter_sample_rate, 1009 .data = &sysctl_perf_event_sample_rate,
985 .maxlen = sizeof(sysctl_perf_counter_sample_rate), 1010 .maxlen = sizeof(sysctl_perf_event_sample_rate),
986 .mode = 0644, 1011 .mode = 0644,
987 .proc_handler = &proc_dointvec, 1012 .proc_handler = &proc_dointvec,
988 }, 1013 },
@@ -997,7 +1022,16 @@ static struct ctl_table kern_table[] = {
997 .proc_handler = &proc_dointvec, 1022 .proc_handler = &proc_dointvec,
998 }, 1023 },
999#endif 1024#endif
1000 1025#ifdef CONFIG_BLOCK
1026 {
1027 .ctl_name = CTL_UNNUMBERED,
1028 .procname = "blk_iopoll",
1029 .data = &blk_iopoll_enabled,
1030 .maxlen = sizeof(int),
1031 .mode = 0644,
1032 .proc_handler = &proc_dointvec,
1033 },
1034#endif
1001/* 1035/*
1002 * NOTE: do not add new entries to this table unless you have read 1036 * NOTE: do not add new entries to this table unless you have read
1003 * Documentation/sysctl/ctl_unnumbered.txt 1037 * Documentation/sysctl/ctl_unnumbered.txt
@@ -1364,6 +1398,31 @@ static struct ctl_table vm_table[] = {
1364 .mode = 0644, 1398 .mode = 0644,
1365 .proc_handler = &scan_unevictable_handler, 1399 .proc_handler = &scan_unevictable_handler,
1366 }, 1400 },
1401#ifdef CONFIG_MEMORY_FAILURE
1402 {
1403 .ctl_name = CTL_UNNUMBERED,
1404 .procname = "memory_failure_early_kill",
1405 .data = &sysctl_memory_failure_early_kill,
1406 .maxlen = sizeof(sysctl_memory_failure_early_kill),
1407 .mode = 0644,
1408 .proc_handler = &proc_dointvec_minmax,
1409 .strategy = &sysctl_intvec,
1410 .extra1 = &zero,
1411 .extra2 = &one,
1412 },
1413 {
1414 .ctl_name = CTL_UNNUMBERED,
1415 .procname = "memory_failure_recovery",
1416 .data = &sysctl_memory_failure_recovery,
1417 .maxlen = sizeof(sysctl_memory_failure_recovery),
1418 .mode = 0644,
1419 .proc_handler = &proc_dointvec_minmax,
1420 .strategy = &sysctl_intvec,
1421 .extra1 = &zero,
1422 .extra2 = &one,
1423 },
1424#endif
1425
1367/* 1426/*
1368 * NOTE: do not add new entries to this table unless you have read 1427 * NOTE: do not add new entries to this table unless you have read
1369 * Documentation/sysctl/ctl_unnumbered.txt 1428 * Documentation/sysctl/ctl_unnumbered.txt
@@ -2192,7 +2251,7 @@ void sysctl_head_put(struct ctl_table_header *head)
2192#ifdef CONFIG_PROC_SYSCTL 2251#ifdef CONFIG_PROC_SYSCTL
2193 2252
2194static int _proc_do_string(void* data, int maxlen, int write, 2253static int _proc_do_string(void* data, int maxlen, int write,
2195 struct file *filp, void __user *buffer, 2254 void __user *buffer,
2196 size_t *lenp, loff_t *ppos) 2255 size_t *lenp, loff_t *ppos)
2197{ 2256{
2198 size_t len; 2257 size_t len;
@@ -2253,7 +2312,6 @@ static int _proc_do_string(void* data, int maxlen, int write,
2253 * proc_dostring - read a string sysctl 2312 * proc_dostring - read a string sysctl
2254 * @table: the sysctl table 2313 * @table: the sysctl table
2255 * @write: %TRUE if this is a write to the sysctl file 2314 * @write: %TRUE if this is a write to the sysctl file
2256 * @filp: the file structure
2257 * @buffer: the user buffer 2315 * @buffer: the user buffer
2258 * @lenp: the size of the user buffer 2316 * @lenp: the size of the user buffer
2259 * @ppos: file position 2317 * @ppos: file position
@@ -2267,10 +2325,10 @@ static int _proc_do_string(void* data, int maxlen, int write,
2267 * 2325 *
2268 * Returns 0 on success. 2326 * Returns 0 on success.
2269 */ 2327 */
2270int proc_dostring(struct ctl_table *table, int write, struct file *filp, 2328int proc_dostring(struct ctl_table *table, int write,
2271 void __user *buffer, size_t *lenp, loff_t *ppos) 2329 void __user *buffer, size_t *lenp, loff_t *ppos)
2272{ 2330{
2273 return _proc_do_string(table->data, table->maxlen, write, filp, 2331 return _proc_do_string(table->data, table->maxlen, write,
2274 buffer, lenp, ppos); 2332 buffer, lenp, ppos);
2275} 2333}
2276 2334
@@ -2295,7 +2353,7 @@ static int do_proc_dointvec_conv(int *negp, unsigned long *lvalp,
2295} 2353}
2296 2354
2297static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, 2355static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
2298 int write, struct file *filp, void __user *buffer, 2356 int write, void __user *buffer,
2299 size_t *lenp, loff_t *ppos, 2357 size_t *lenp, loff_t *ppos,
2300 int (*conv)(int *negp, unsigned long *lvalp, int *valp, 2358 int (*conv)(int *negp, unsigned long *lvalp, int *valp,
2301 int write, void *data), 2359 int write, void *data),
@@ -2402,13 +2460,13 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
2402#undef TMPBUFLEN 2460#undef TMPBUFLEN
2403} 2461}
2404 2462
2405static int do_proc_dointvec(struct ctl_table *table, int write, struct file *filp, 2463static int do_proc_dointvec(struct ctl_table *table, int write,
2406 void __user *buffer, size_t *lenp, loff_t *ppos, 2464 void __user *buffer, size_t *lenp, loff_t *ppos,
2407 int (*conv)(int *negp, unsigned long *lvalp, int *valp, 2465 int (*conv)(int *negp, unsigned long *lvalp, int *valp,
2408 int write, void *data), 2466 int write, void *data),
2409 void *data) 2467 void *data)
2410{ 2468{
2411 return __do_proc_dointvec(table->data, table, write, filp, 2469 return __do_proc_dointvec(table->data, table, write,
2412 buffer, lenp, ppos, conv, data); 2470 buffer, lenp, ppos, conv, data);
2413} 2471}
2414 2472
@@ -2416,7 +2474,6 @@ static int do_proc_dointvec(struct ctl_table *table, int write, struct file *fil
2416 * proc_dointvec - read a vector of integers 2474 * proc_dointvec - read a vector of integers
2417 * @table: the sysctl table 2475 * @table: the sysctl table
2418 * @write: %TRUE if this is a write to the sysctl file 2476 * @write: %TRUE if this is a write to the sysctl file
2419 * @filp: the file structure
2420 * @buffer: the user buffer 2477 * @buffer: the user buffer
2421 * @lenp: the size of the user buffer 2478 * @lenp: the size of the user buffer
2422 * @ppos: file position 2479 * @ppos: file position
@@ -2426,10 +2483,10 @@ static int do_proc_dointvec(struct ctl_table *table, int write, struct file *fil
2426 * 2483 *
2427 * Returns 0 on success. 2484 * Returns 0 on success.
2428 */ 2485 */
2429int proc_dointvec(struct ctl_table *table, int write, struct file *filp, 2486int proc_dointvec(struct ctl_table *table, int write,
2430 void __user *buffer, size_t *lenp, loff_t *ppos) 2487 void __user *buffer, size_t *lenp, loff_t *ppos)
2431{ 2488{
2432 return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, 2489 return do_proc_dointvec(table,write,buffer,lenp,ppos,
2433 NULL,NULL); 2490 NULL,NULL);
2434} 2491}
2435 2492
@@ -2437,7 +2494,7 @@ int proc_dointvec(struct ctl_table *table, int write, struct file *filp,
2437 * Taint values can only be increased 2494 * Taint values can only be increased
2438 * This means we can safely use a temporary. 2495 * This means we can safely use a temporary.
2439 */ 2496 */
2440static int proc_taint(struct ctl_table *table, int write, struct file *filp, 2497static int proc_taint(struct ctl_table *table, int write,
2441 void __user *buffer, size_t *lenp, loff_t *ppos) 2498 void __user *buffer, size_t *lenp, loff_t *ppos)
2442{ 2499{
2443 struct ctl_table t; 2500 struct ctl_table t;
@@ -2449,7 +2506,7 @@ static int proc_taint(struct ctl_table *table, int write, struct file *filp,
2449 2506
2450 t = *table; 2507 t = *table;
2451 t.data = &tmptaint; 2508 t.data = &tmptaint;
2452 err = proc_doulongvec_minmax(&t, write, filp, buffer, lenp, ppos); 2509 err = proc_doulongvec_minmax(&t, write, buffer, lenp, ppos);
2453 if (err < 0) 2510 if (err < 0)
2454 return err; 2511 return err;
2455 2512
@@ -2501,7 +2558,6 @@ static int do_proc_dointvec_minmax_conv(int *negp, unsigned long *lvalp,
2501 * proc_dointvec_minmax - read a vector of integers with min/max values 2558 * proc_dointvec_minmax - read a vector of integers with min/max values
2502 * @table: the sysctl table 2559 * @table: the sysctl table
2503 * @write: %TRUE if this is a write to the sysctl file 2560 * @write: %TRUE if this is a write to the sysctl file
2504 * @filp: the file structure
2505 * @buffer: the user buffer 2561 * @buffer: the user buffer
2506 * @lenp: the size of the user buffer 2562 * @lenp: the size of the user buffer
2507 * @ppos: file position 2563 * @ppos: file position
@@ -2514,19 +2570,18 @@ static int do_proc_dointvec_minmax_conv(int *negp, unsigned long *lvalp,
2514 * 2570 *
2515 * Returns 0 on success. 2571 * Returns 0 on success.
2516 */ 2572 */
2517int proc_dointvec_minmax(struct ctl_table *table, int write, struct file *filp, 2573int proc_dointvec_minmax(struct ctl_table *table, int write,
2518 void __user *buffer, size_t *lenp, loff_t *ppos) 2574 void __user *buffer, size_t *lenp, loff_t *ppos)
2519{ 2575{
2520 struct do_proc_dointvec_minmax_conv_param param = { 2576 struct do_proc_dointvec_minmax_conv_param param = {
2521 .min = (int *) table->extra1, 2577 .min = (int *) table->extra1,
2522 .max = (int *) table->extra2, 2578 .max = (int *) table->extra2,
2523 }; 2579 };
2524 return do_proc_dointvec(table, write, filp, buffer, lenp, ppos, 2580 return do_proc_dointvec(table, write, buffer, lenp, ppos,
2525 do_proc_dointvec_minmax_conv, &param); 2581 do_proc_dointvec_minmax_conv, &param);
2526} 2582}
2527 2583
2528static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, 2584static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write,
2529 struct file *filp,
2530 void __user *buffer, 2585 void __user *buffer,
2531 size_t *lenp, loff_t *ppos, 2586 size_t *lenp, loff_t *ppos,
2532 unsigned long convmul, 2587 unsigned long convmul,
@@ -2631,21 +2686,19 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int
2631} 2686}
2632 2687
2633static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, 2688static int do_proc_doulongvec_minmax(struct ctl_table *table, int write,
2634 struct file *filp,
2635 void __user *buffer, 2689 void __user *buffer,
2636 size_t *lenp, loff_t *ppos, 2690 size_t *lenp, loff_t *ppos,
2637 unsigned long convmul, 2691 unsigned long convmul,
2638 unsigned long convdiv) 2692 unsigned long convdiv)
2639{ 2693{
2640 return __do_proc_doulongvec_minmax(table->data, table, write, 2694 return __do_proc_doulongvec_minmax(table->data, table, write,
2641 filp, buffer, lenp, ppos, convmul, convdiv); 2695 buffer, lenp, ppos, convmul, convdiv);
2642} 2696}
2643 2697
2644/** 2698/**
2645 * proc_doulongvec_minmax - read a vector of long integers with min/max values 2699 * proc_doulongvec_minmax - read a vector of long integers with min/max values
2646 * @table: the sysctl table 2700 * @table: the sysctl table
2647 * @write: %TRUE if this is a write to the sysctl file 2701 * @write: %TRUE if this is a write to the sysctl file
2648 * @filp: the file structure
2649 * @buffer: the user buffer 2702 * @buffer: the user buffer
2650 * @lenp: the size of the user buffer 2703 * @lenp: the size of the user buffer
2651 * @ppos: file position 2704 * @ppos: file position
@@ -2658,17 +2711,16 @@ static int do_proc_doulongvec_minmax(struct ctl_table *table, int write,
2658 * 2711 *
2659 * Returns 0 on success. 2712 * Returns 0 on success.
2660 */ 2713 */
2661int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp, 2714int proc_doulongvec_minmax(struct ctl_table *table, int write,
2662 void __user *buffer, size_t *lenp, loff_t *ppos) 2715 void __user *buffer, size_t *lenp, loff_t *ppos)
2663{ 2716{
2664 return do_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos, 1l, 1l); 2717 return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l);
2665} 2718}
2666 2719
2667/** 2720/**
2668 * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values with min/max values 2721 * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values with min/max values
2669 * @table: the sysctl table 2722 * @table: the sysctl table
2670 * @write: %TRUE if this is a write to the sysctl file 2723 * @write: %TRUE if this is a write to the sysctl file
2671 * @filp: the file structure
2672 * @buffer: the user buffer 2724 * @buffer: the user buffer
2673 * @lenp: the size of the user buffer 2725 * @lenp: the size of the user buffer
2674 * @ppos: file position 2726 * @ppos: file position
@@ -2683,11 +2735,10 @@ int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp
2683 * Returns 0 on success. 2735 * Returns 0 on success.
2684 */ 2736 */
2685int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, 2737int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
2686 struct file *filp,
2687 void __user *buffer, 2738 void __user *buffer,
2688 size_t *lenp, loff_t *ppos) 2739 size_t *lenp, loff_t *ppos)
2689{ 2740{
2690 return do_proc_doulongvec_minmax(table, write, filp, buffer, 2741 return do_proc_doulongvec_minmax(table, write, buffer,
2691 lenp, ppos, HZ, 1000l); 2742 lenp, ppos, HZ, 1000l);
2692} 2743}
2693 2744
@@ -2763,7 +2814,6 @@ static int do_proc_dointvec_ms_jiffies_conv(int *negp, unsigned long *lvalp,
2763 * proc_dointvec_jiffies - read a vector of integers as seconds 2814 * proc_dointvec_jiffies - read a vector of integers as seconds
2764 * @table: the sysctl table 2815 * @table: the sysctl table
2765 * @write: %TRUE if this is a write to the sysctl file 2816 * @write: %TRUE if this is a write to the sysctl file
2766 * @filp: the file structure
2767 * @buffer: the user buffer 2817 * @buffer: the user buffer
2768 * @lenp: the size of the user buffer 2818 * @lenp: the size of the user buffer
2769 * @ppos: file position 2819 * @ppos: file position
@@ -2775,10 +2825,10 @@ static int do_proc_dointvec_ms_jiffies_conv(int *negp, unsigned long *lvalp,
2775 * 2825 *
2776 * Returns 0 on success. 2826 * Returns 0 on success.
2777 */ 2827 */
2778int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, 2828int proc_dointvec_jiffies(struct ctl_table *table, int write,
2779 void __user *buffer, size_t *lenp, loff_t *ppos) 2829 void __user *buffer, size_t *lenp, loff_t *ppos)
2780{ 2830{
2781 return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, 2831 return do_proc_dointvec(table,write,buffer,lenp,ppos,
2782 do_proc_dointvec_jiffies_conv,NULL); 2832 do_proc_dointvec_jiffies_conv,NULL);
2783} 2833}
2784 2834
@@ -2786,7 +2836,6 @@ int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp,
2786 * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds 2836 * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds
2787 * @table: the sysctl table 2837 * @table: the sysctl table
2788 * @write: %TRUE if this is a write to the sysctl file 2838 * @write: %TRUE if this is a write to the sysctl file
2789 * @filp: the file structure
2790 * @buffer: the user buffer 2839 * @buffer: the user buffer
2791 * @lenp: the size of the user buffer 2840 * @lenp: the size of the user buffer
2792 * @ppos: pointer to the file position 2841 * @ppos: pointer to the file position
@@ -2798,10 +2847,10 @@ int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp,
2798 * 2847 *
2799 * Returns 0 on success. 2848 * Returns 0 on success.
2800 */ 2849 */
2801int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file *filp, 2850int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write,
2802 void __user *buffer, size_t *lenp, loff_t *ppos) 2851 void __user *buffer, size_t *lenp, loff_t *ppos)
2803{ 2852{
2804 return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, 2853 return do_proc_dointvec(table,write,buffer,lenp,ppos,
2805 do_proc_dointvec_userhz_jiffies_conv,NULL); 2854 do_proc_dointvec_userhz_jiffies_conv,NULL);
2806} 2855}
2807 2856
@@ -2809,7 +2858,6 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file
2809 * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds 2858 * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds
2810 * @table: the sysctl table 2859 * @table: the sysctl table
2811 * @write: %TRUE if this is a write to the sysctl file 2860 * @write: %TRUE if this is a write to the sysctl file
2812 * @filp: the file structure
2813 * @buffer: the user buffer 2861 * @buffer: the user buffer
2814 * @lenp: the size of the user buffer 2862 * @lenp: the size of the user buffer
2815 * @ppos: file position 2863 * @ppos: file position
@@ -2822,14 +2870,14 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file
2822 * 2870 *
2823 * Returns 0 on success. 2871 * Returns 0 on success.
2824 */ 2872 */
2825int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, struct file *filp, 2873int proc_dointvec_ms_jiffies(struct ctl_table *table, int write,
2826 void __user *buffer, size_t *lenp, loff_t *ppos) 2874 void __user *buffer, size_t *lenp, loff_t *ppos)
2827{ 2875{
2828 return do_proc_dointvec(table, write, filp, buffer, lenp, ppos, 2876 return do_proc_dointvec(table, write, buffer, lenp, ppos,
2829 do_proc_dointvec_ms_jiffies_conv, NULL); 2877 do_proc_dointvec_ms_jiffies_conv, NULL);
2830} 2878}
2831 2879
2832static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp, 2880static int proc_do_cad_pid(struct ctl_table *table, int write,
2833 void __user *buffer, size_t *lenp, loff_t *ppos) 2881 void __user *buffer, size_t *lenp, loff_t *ppos)
2834{ 2882{
2835 struct pid *new_pid; 2883 struct pid *new_pid;
@@ -2838,7 +2886,7 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp
2838 2886
2839 tmp = pid_vnr(cad_pid); 2887 tmp = pid_vnr(cad_pid);
2840 2888
2841 r = __do_proc_dointvec(&tmp, table, write, filp, buffer, 2889 r = __do_proc_dointvec(&tmp, table, write, buffer,
2842 lenp, ppos, NULL, NULL); 2890 lenp, ppos, NULL, NULL);
2843 if (r || !write) 2891 if (r || !write)
2844 return r; 2892 return r;
@@ -2853,50 +2901,49 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp
2853 2901
2854#else /* CONFIG_PROC_FS */ 2902#else /* CONFIG_PROC_FS */
2855 2903
2856int proc_dostring(struct ctl_table *table, int write, struct file *filp, 2904int proc_dostring(struct ctl_table *table, int write,
2857 void __user *buffer, size_t *lenp, loff_t *ppos) 2905 void __user *buffer, size_t *lenp, loff_t *ppos)
2858{ 2906{
2859 return -ENOSYS; 2907 return -ENOSYS;
2860} 2908}
2861 2909
2862int proc_dointvec(struct ctl_table *table, int write, struct file *filp, 2910int proc_dointvec(struct ctl_table *table, int write,
2863 void __user *buffer, size_t *lenp, loff_t *ppos) 2911 void __user *buffer, size_t *lenp, loff_t *ppos)
2864{ 2912{
2865 return -ENOSYS; 2913 return -ENOSYS;
2866} 2914}
2867 2915
2868int proc_dointvec_minmax(struct ctl_table *table, int write, struct file *filp, 2916int proc_dointvec_minmax(struct ctl_table *table, int write,
2869 void __user *buffer, size_t *lenp, loff_t *ppos) 2917 void __user *buffer, size_t *lenp, loff_t *ppos)
2870{ 2918{
2871 return -ENOSYS; 2919 return -ENOSYS;
2872} 2920}
2873 2921
2874int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, 2922int proc_dointvec_jiffies(struct ctl_table *table, int write,
2875 void __user *buffer, size_t *lenp, loff_t *ppos) 2923 void __user *buffer, size_t *lenp, loff_t *ppos)
2876{ 2924{
2877 return -ENOSYS; 2925 return -ENOSYS;
2878} 2926}
2879 2927
2880int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file *filp, 2928int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write,
2881 void __user *buffer, size_t *lenp, loff_t *ppos) 2929 void __user *buffer, size_t *lenp, loff_t *ppos)
2882{ 2930{
2883 return -ENOSYS; 2931 return -ENOSYS;
2884} 2932}
2885 2933
2886int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, struct file *filp, 2934int proc_dointvec_ms_jiffies(struct ctl_table *table, int write,
2887 void __user *buffer, size_t *lenp, loff_t *ppos) 2935 void __user *buffer, size_t *lenp, loff_t *ppos)
2888{ 2936{
2889 return -ENOSYS; 2937 return -ENOSYS;
2890} 2938}
2891 2939
2892int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp, 2940int proc_doulongvec_minmax(struct ctl_table *table, int write,
2893 void __user *buffer, size_t *lenp, loff_t *ppos) 2941 void __user *buffer, size_t *lenp, loff_t *ppos)
2894{ 2942{
2895 return -ENOSYS; 2943 return -ENOSYS;
2896} 2944}
2897 2945
2898int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, 2946int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
2899 struct file *filp,
2900 void __user *buffer, 2947 void __user *buffer,
2901 size_t *lenp, loff_t *ppos) 2948 size_t *lenp, loff_t *ppos)
2902{ 2949{