diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-10-01 05:20:33 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-10-01 05:20:48 -0400 |
| commit | 0aa73ba1c4e1ad1d51a29e0df95ccd9f746918b6 (patch) | |
| tree | f0714ddcd02812b4fbe3b5405df9e4068f5587e2 /kernel/sysctl.c | |
| parent | 925936ebf35a95c290e010b784c962164e6728f3 (diff) | |
| parent | 33974093c024f08caadd2fc71a83bd811ed1831d (diff) | |
Merge branch 'tracing/urgent' into tracing/core
Merge reason: Pick up latest fixes and update to latest upstream.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 149 |
1 files changed, 92 insertions, 57 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 1a631ba684a4..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; | |||
| 77 | extern int core_uses_pid; | 76 | extern int core_uses_pid; |
| 78 | extern int suid_dumpable; | 77 | extern int suid_dumpable; |
| 79 | extern char core_pattern[]; | 78 | extern char core_pattern[]; |
| 79 | extern unsigned int core_pipe_limit; | ||
| 80 | extern int pid_max; | 80 | extern int pid_max; |
| 81 | extern int min_free_kbytes; | 81 | extern int min_free_kbytes; |
| 82 | extern int pid_max_min, pid_max_max; | 82 | extern int pid_max_min, pid_max_max; |
| @@ -106,6 +106,9 @@ static int __maybe_unused one = 1; | |||
| 106 | static int __maybe_unused two = 2; | 106 | static int __maybe_unused two = 2; |
| 107 | static unsigned long one_ul = 1; | 107 | static unsigned long one_ul = 1; |
| 108 | static int one_hundred = 100; | 108 | static int one_hundred = 100; |
| 109 | #ifdef CONFIG_PRINTK | ||
| 110 | static int ten_thousand = 10000; | ||
| 111 | #endif | ||
| 109 | 112 | ||
| 110 | /* 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 */ |
| 111 | static unsigned long dirty_bytes_min = 2 * PAGE_SIZE; | 114 | static unsigned long dirty_bytes_min = 2 * PAGE_SIZE; |
| @@ -160,9 +163,9 @@ extern int max_lock_depth; | |||
| 160 | #endif | 163 | #endif |
| 161 | 164 | ||
| 162 | #ifdef CONFIG_PROC_SYSCTL | 165 | #ifdef CONFIG_PROC_SYSCTL |
| 163 | static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp, | 166 | static int proc_do_cad_pid(struct ctl_table *table, int write, |
| 164 | void __user *buffer, size_t *lenp, loff_t *ppos); | 167 | void __user *buffer, size_t *lenp, loff_t *ppos); |
| 165 | static int proc_taint(struct ctl_table *table, int write, struct file *filp, | 168 | static int proc_taint(struct ctl_table *table, int write, |
| 166 | void __user *buffer, size_t *lenp, loff_t *ppos); | 169 | void __user *buffer, size_t *lenp, loff_t *ppos); |
| 167 | #endif | 170 | #endif |
| 168 | 171 | ||
| @@ -421,6 +424,14 @@ static struct ctl_table kern_table[] = { | |||
| 421 | .proc_handler = &proc_dostring, | 424 | .proc_handler = &proc_dostring, |
| 422 | .strategy = &sysctl_string, | 425 | .strategy = &sysctl_string, |
| 423 | }, | 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 | }, | ||
| 424 | #ifdef CONFIG_PROC_SYSCTL | 435 | #ifdef CONFIG_PROC_SYSCTL |
| 425 | { | 436 | { |
| 426 | .procname = "tainted", | 437 | .procname = "tainted", |
| @@ -722,6 +733,17 @@ static struct ctl_table kern_table[] = { | |||
| 722 | .mode = 0644, | 733 | .mode = 0644, |
| 723 | .proc_handler = &proc_dointvec, | 734 | .proc_handler = &proc_dointvec, |
| 724 | }, | 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 | }, | ||
| 725 | #endif | 747 | #endif |
| 726 | { | 748 | { |
| 727 | .ctl_name = KERN_NGROUPS_MAX, | 749 | .ctl_name = KERN_NGROUPS_MAX, |
| @@ -964,28 +986,28 @@ static struct ctl_table kern_table[] = { | |||
| 964 | .child = slow_work_sysctls, | 986 | .child = slow_work_sysctls, |
| 965 | }, | 987 | }, |
| 966 | #endif | 988 | #endif |
| 967 | #ifdef CONFIG_PERF_COUNTERS | 989 | #ifdef CONFIG_PERF_EVENTS |
| 968 | { | 990 | { |
| 969 | .ctl_name = CTL_UNNUMBERED, | 991 | .ctl_name = CTL_UNNUMBERED, |
| 970 | .procname = "perf_counter_paranoid", | 992 | .procname = "perf_event_paranoid", |
| 971 | .data = &sysctl_perf_counter_paranoid, | 993 | .data = &sysctl_perf_event_paranoid, |
| 972 | .maxlen = sizeof(sysctl_perf_counter_paranoid), | 994 | .maxlen = sizeof(sysctl_perf_event_paranoid), |
| 973 | .mode = 0644, | 995 | .mode = 0644, |
| 974 | .proc_handler = &proc_dointvec, | 996 | .proc_handler = &proc_dointvec, |
| 975 | }, | 997 | }, |
| 976 | { | 998 | { |
| 977 | .ctl_name = CTL_UNNUMBERED, | 999 | .ctl_name = CTL_UNNUMBERED, |
| 978 | .procname = "perf_counter_mlock_kb", | 1000 | .procname = "perf_event_mlock_kb", |
| 979 | .data = &sysctl_perf_counter_mlock, | 1001 | .data = &sysctl_perf_event_mlock, |
| 980 | .maxlen = sizeof(sysctl_perf_counter_mlock), | 1002 | .maxlen = sizeof(sysctl_perf_event_mlock), |
| 981 | .mode = 0644, | 1003 | .mode = 0644, |
| 982 | .proc_handler = &proc_dointvec, | 1004 | .proc_handler = &proc_dointvec, |
| 983 | }, | 1005 | }, |
| 984 | { | 1006 | { |
| 985 | .ctl_name = CTL_UNNUMBERED, | 1007 | .ctl_name = CTL_UNNUMBERED, |
| 986 | .procname = "perf_counter_max_sample_rate", | 1008 | .procname = "perf_event_max_sample_rate", |
| 987 | .data = &sysctl_perf_counter_sample_rate, | 1009 | .data = &sysctl_perf_event_sample_rate, |
| 988 | .maxlen = sizeof(sysctl_perf_counter_sample_rate), | 1010 | .maxlen = sizeof(sysctl_perf_event_sample_rate), |
| 989 | .mode = 0644, | 1011 | .mode = 0644, |
| 990 | .proc_handler = &proc_dointvec, | 1012 | .proc_handler = &proc_dointvec, |
| 991 | }, | 1013 | }, |
| @@ -1376,6 +1398,31 @@ static struct ctl_table vm_table[] = { | |||
| 1376 | .mode = 0644, | 1398 | .mode = 0644, |
| 1377 | .proc_handler = &scan_unevictable_handler, | 1399 | .proc_handler = &scan_unevictable_handler, |
| 1378 | }, | 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 | |||
| 1379 | /* | 1426 | /* |
| 1380 | * 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 |
| 1381 | * Documentation/sysctl/ctl_unnumbered.txt | 1428 | * Documentation/sysctl/ctl_unnumbered.txt |
| @@ -2204,7 +2251,7 @@ void sysctl_head_put(struct ctl_table_header *head) | |||
| 2204 | #ifdef CONFIG_PROC_SYSCTL | 2251 | #ifdef CONFIG_PROC_SYSCTL |
| 2205 | 2252 | ||
| 2206 | static int _proc_do_string(void* data, int maxlen, int write, | 2253 | static int _proc_do_string(void* data, int maxlen, int write, |
| 2207 | struct file *filp, void __user *buffer, | 2254 | void __user *buffer, |
| 2208 | size_t *lenp, loff_t *ppos) | 2255 | size_t *lenp, loff_t *ppos) |
| 2209 | { | 2256 | { |
| 2210 | size_t len; | 2257 | size_t len; |
| @@ -2265,7 +2312,6 @@ static int _proc_do_string(void* data, int maxlen, int write, | |||
| 2265 | * proc_dostring - read a string sysctl | 2312 | * proc_dostring - read a string sysctl |
| 2266 | * @table: the sysctl table | 2313 | * @table: the sysctl table |
| 2267 | * @write: %TRUE if this is a write to the sysctl file | 2314 | * @write: %TRUE if this is a write to the sysctl file |
| 2268 | * @filp: the file structure | ||
| 2269 | * @buffer: the user buffer | 2315 | * @buffer: the user buffer |
| 2270 | * @lenp: the size of the user buffer | 2316 | * @lenp: the size of the user buffer |
| 2271 | * @ppos: file position | 2317 | * @ppos: file position |
| @@ -2279,10 +2325,10 @@ static int _proc_do_string(void* data, int maxlen, int write, | |||
| 2279 | * | 2325 | * |
| 2280 | * Returns 0 on success. | 2326 | * Returns 0 on success. |
| 2281 | */ | 2327 | */ |
| 2282 | int proc_dostring(struct ctl_table *table, int write, struct file *filp, | 2328 | int proc_dostring(struct ctl_table *table, int write, |
| 2283 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2329 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2284 | { | 2330 | { |
| 2285 | return _proc_do_string(table->data, table->maxlen, write, filp, | 2331 | return _proc_do_string(table->data, table->maxlen, write, |
| 2286 | buffer, lenp, ppos); | 2332 | buffer, lenp, ppos); |
| 2287 | } | 2333 | } |
| 2288 | 2334 | ||
| @@ -2307,7 +2353,7 @@ static int do_proc_dointvec_conv(int *negp, unsigned long *lvalp, | |||
| 2307 | } | 2353 | } |
| 2308 | 2354 | ||
| 2309 | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, | 2355 | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, |
| 2310 | int write, struct file *filp, void __user *buffer, | 2356 | int write, void __user *buffer, |
| 2311 | size_t *lenp, loff_t *ppos, | 2357 | size_t *lenp, loff_t *ppos, |
| 2312 | int (*conv)(int *negp, unsigned long *lvalp, int *valp, | 2358 | int (*conv)(int *negp, unsigned long *lvalp, int *valp, |
| 2313 | int write, void *data), | 2359 | int write, void *data), |
| @@ -2414,13 +2460,13 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, | |||
| 2414 | #undef TMPBUFLEN | 2460 | #undef TMPBUFLEN |
| 2415 | } | 2461 | } |
| 2416 | 2462 | ||
| 2417 | static int do_proc_dointvec(struct ctl_table *table, int write, struct file *filp, | 2463 | static int do_proc_dointvec(struct ctl_table *table, int write, |
| 2418 | void __user *buffer, size_t *lenp, loff_t *ppos, | 2464 | void __user *buffer, size_t *lenp, loff_t *ppos, |
| 2419 | int (*conv)(int *negp, unsigned long *lvalp, int *valp, | 2465 | int (*conv)(int *negp, unsigned long *lvalp, int *valp, |
| 2420 | int write, void *data), | 2466 | int write, void *data), |
| 2421 | void *data) | 2467 | void *data) |
| 2422 | { | 2468 | { |
| 2423 | return __do_proc_dointvec(table->data, table, write, filp, | 2469 | return __do_proc_dointvec(table->data, table, write, |
| 2424 | buffer, lenp, ppos, conv, data); | 2470 | buffer, lenp, ppos, conv, data); |
| 2425 | } | 2471 | } |
| 2426 | 2472 | ||
| @@ -2428,7 +2474,6 @@ static int do_proc_dointvec(struct ctl_table *table, int write, struct file *fil | |||
| 2428 | * proc_dointvec - read a vector of integers | 2474 | * proc_dointvec - read a vector of integers |
| 2429 | * @table: the sysctl table | 2475 | * @table: the sysctl table |
| 2430 | * @write: %TRUE if this is a write to the sysctl file | 2476 | * @write: %TRUE if this is a write to the sysctl file |
| 2431 | * @filp: the file structure | ||
| 2432 | * @buffer: the user buffer | 2477 | * @buffer: the user buffer |
| 2433 | * @lenp: the size of the user buffer | 2478 | * @lenp: the size of the user buffer |
| 2434 | * @ppos: file position | 2479 | * @ppos: file position |
| @@ -2438,10 +2483,10 @@ static int do_proc_dointvec(struct ctl_table *table, int write, struct file *fil | |||
| 2438 | * | 2483 | * |
| 2439 | * Returns 0 on success. | 2484 | * Returns 0 on success. |
| 2440 | */ | 2485 | */ |
| 2441 | int proc_dointvec(struct ctl_table *table, int write, struct file *filp, | 2486 | int proc_dointvec(struct ctl_table *table, int write, |
| 2442 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2487 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2443 | { | 2488 | { |
| 2444 | return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, | 2489 | return do_proc_dointvec(table,write,buffer,lenp,ppos, |
| 2445 | NULL,NULL); | 2490 | NULL,NULL); |
| 2446 | } | 2491 | } |
| 2447 | 2492 | ||
| @@ -2449,7 +2494,7 @@ int proc_dointvec(struct ctl_table *table, int write, struct file *filp, | |||
| 2449 | * Taint values can only be increased | 2494 | * Taint values can only be increased |
| 2450 | * This means we can safely use a temporary. | 2495 | * This means we can safely use a temporary. |
| 2451 | */ | 2496 | */ |
| 2452 | static int proc_taint(struct ctl_table *table, int write, struct file *filp, | 2497 | static int proc_taint(struct ctl_table *table, int write, |
| 2453 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2498 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2454 | { | 2499 | { |
| 2455 | struct ctl_table t; | 2500 | struct ctl_table t; |
| @@ -2461,7 +2506,7 @@ static int proc_taint(struct ctl_table *table, int write, struct file *filp, | |||
| 2461 | 2506 | ||
| 2462 | t = *table; | 2507 | t = *table; |
| 2463 | t.data = &tmptaint; | 2508 | t.data = &tmptaint; |
| 2464 | err = proc_doulongvec_minmax(&t, write, filp, buffer, lenp, ppos); | 2509 | err = proc_doulongvec_minmax(&t, write, buffer, lenp, ppos); |
| 2465 | if (err < 0) | 2510 | if (err < 0) |
| 2466 | return err; | 2511 | return err; |
| 2467 | 2512 | ||
| @@ -2513,7 +2558,6 @@ static int do_proc_dointvec_minmax_conv(int *negp, unsigned long *lvalp, | |||
| 2513 | * 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 |
| 2514 | * @table: the sysctl table | 2559 | * @table: the sysctl table |
| 2515 | * @write: %TRUE if this is a write to the sysctl file | 2560 | * @write: %TRUE if this is a write to the sysctl file |
| 2516 | * @filp: the file structure | ||
| 2517 | * @buffer: the user buffer | 2561 | * @buffer: the user buffer |
| 2518 | * @lenp: the size of the user buffer | 2562 | * @lenp: the size of the user buffer |
| 2519 | * @ppos: file position | 2563 | * @ppos: file position |
| @@ -2526,19 +2570,18 @@ static int do_proc_dointvec_minmax_conv(int *negp, unsigned long *lvalp, | |||
| 2526 | * | 2570 | * |
| 2527 | * Returns 0 on success. | 2571 | * Returns 0 on success. |
| 2528 | */ | 2572 | */ |
| 2529 | int proc_dointvec_minmax(struct ctl_table *table, int write, struct file *filp, | 2573 | int proc_dointvec_minmax(struct ctl_table *table, int write, |
| 2530 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2574 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2531 | { | 2575 | { |
| 2532 | struct do_proc_dointvec_minmax_conv_param param = { | 2576 | struct do_proc_dointvec_minmax_conv_param param = { |
| 2533 | .min = (int *) table->extra1, | 2577 | .min = (int *) table->extra1, |
| 2534 | .max = (int *) table->extra2, | 2578 | .max = (int *) table->extra2, |
| 2535 | }; | 2579 | }; |
| 2536 | return do_proc_dointvec(table, write, filp, buffer, lenp, ppos, | 2580 | return do_proc_dointvec(table, write, buffer, lenp, ppos, |
| 2537 | do_proc_dointvec_minmax_conv, ¶m); | 2581 | do_proc_dointvec_minmax_conv, ¶m); |
| 2538 | } | 2582 | } |
| 2539 | 2583 | ||
| 2540 | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, | 2584 | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, |
| 2541 | struct file *filp, | ||
| 2542 | void __user *buffer, | 2585 | void __user *buffer, |
| 2543 | size_t *lenp, loff_t *ppos, | 2586 | size_t *lenp, loff_t *ppos, |
| 2544 | unsigned long convmul, | 2587 | unsigned long convmul, |
| @@ -2643,21 +2686,19 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int | |||
| 2643 | } | 2686 | } |
| 2644 | 2687 | ||
| 2645 | static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, | 2688 | static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, |
| 2646 | struct file *filp, | ||
| 2647 | void __user *buffer, | 2689 | void __user *buffer, |
| 2648 | size_t *lenp, loff_t *ppos, | 2690 | size_t *lenp, loff_t *ppos, |
| 2649 | unsigned long convmul, | 2691 | unsigned long convmul, |
| 2650 | unsigned long convdiv) | 2692 | unsigned long convdiv) |
| 2651 | { | 2693 | { |
| 2652 | return __do_proc_doulongvec_minmax(table->data, table, write, | 2694 | return __do_proc_doulongvec_minmax(table->data, table, write, |
| 2653 | filp, buffer, lenp, ppos, convmul, convdiv); | 2695 | buffer, lenp, ppos, convmul, convdiv); |
| 2654 | } | 2696 | } |
| 2655 | 2697 | ||
| 2656 | /** | 2698 | /** |
| 2657 | * 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 |
| 2658 | * @table: the sysctl table | 2700 | * @table: the sysctl table |
| 2659 | * @write: %TRUE if this is a write to the sysctl file | 2701 | * @write: %TRUE if this is a write to the sysctl file |
| 2660 | * @filp: the file structure | ||
| 2661 | * @buffer: the user buffer | 2702 | * @buffer: the user buffer |
| 2662 | * @lenp: the size of the user buffer | 2703 | * @lenp: the size of the user buffer |
| 2663 | * @ppos: file position | 2704 | * @ppos: file position |
| @@ -2670,17 +2711,16 @@ static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, | |||
| 2670 | * | 2711 | * |
| 2671 | * Returns 0 on success. | 2712 | * Returns 0 on success. |
| 2672 | */ | 2713 | */ |
| 2673 | int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp, | 2714 | int proc_doulongvec_minmax(struct ctl_table *table, int write, |
| 2674 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2715 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2675 | { | 2716 | { |
| 2676 | 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); |
| 2677 | } | 2718 | } |
| 2678 | 2719 | ||
| 2679 | /** | 2720 | /** |
| 2680 | * 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 |
| 2681 | * @table: the sysctl table | 2722 | * @table: the sysctl table |
| 2682 | * @write: %TRUE if this is a write to the sysctl file | 2723 | * @write: %TRUE if this is a write to the sysctl file |
| 2683 | * @filp: the file structure | ||
| 2684 | * @buffer: the user buffer | 2724 | * @buffer: the user buffer |
| 2685 | * @lenp: the size of the user buffer | 2725 | * @lenp: the size of the user buffer |
| 2686 | * @ppos: file position | 2726 | * @ppos: file position |
| @@ -2695,11 +2735,10 @@ int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp | |||
| 2695 | * Returns 0 on success. | 2735 | * Returns 0 on success. |
| 2696 | */ | 2736 | */ |
| 2697 | int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, | 2737 | int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, |
| 2698 | struct file *filp, | ||
| 2699 | void __user *buffer, | 2738 | void __user *buffer, |
| 2700 | size_t *lenp, loff_t *ppos) | 2739 | size_t *lenp, loff_t *ppos) |
| 2701 | { | 2740 | { |
| 2702 | return do_proc_doulongvec_minmax(table, write, filp, buffer, | 2741 | return do_proc_doulongvec_minmax(table, write, buffer, |
| 2703 | lenp, ppos, HZ, 1000l); | 2742 | lenp, ppos, HZ, 1000l); |
| 2704 | } | 2743 | } |
| 2705 | 2744 | ||
| @@ -2775,7 +2814,6 @@ static int do_proc_dointvec_ms_jiffies_conv(int *negp, unsigned long *lvalp, | |||
| 2775 | * proc_dointvec_jiffies - read a vector of integers as seconds | 2814 | * proc_dointvec_jiffies - read a vector of integers as seconds |
| 2776 | * @table: the sysctl table | 2815 | * @table: the sysctl table |
| 2777 | * @write: %TRUE if this is a write to the sysctl file | 2816 | * @write: %TRUE if this is a write to the sysctl file |
| 2778 | * @filp: the file structure | ||
| 2779 | * @buffer: the user buffer | 2817 | * @buffer: the user buffer |
| 2780 | * @lenp: the size of the user buffer | 2818 | * @lenp: the size of the user buffer |
| 2781 | * @ppos: file position | 2819 | * @ppos: file position |
| @@ -2787,10 +2825,10 @@ static int do_proc_dointvec_ms_jiffies_conv(int *negp, unsigned long *lvalp, | |||
| 2787 | * | 2825 | * |
| 2788 | * Returns 0 on success. | 2826 | * Returns 0 on success. |
| 2789 | */ | 2827 | */ |
| 2790 | int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, | 2828 | int proc_dointvec_jiffies(struct ctl_table *table, int write, |
| 2791 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2829 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2792 | { | 2830 | { |
| 2793 | return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, | 2831 | return do_proc_dointvec(table,write,buffer,lenp,ppos, |
| 2794 | do_proc_dointvec_jiffies_conv,NULL); | 2832 | do_proc_dointvec_jiffies_conv,NULL); |
| 2795 | } | 2833 | } |
| 2796 | 2834 | ||
| @@ -2798,7 +2836,6 @@ int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, | |||
| 2798 | * 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 |
| 2799 | * @table: the sysctl table | 2837 | * @table: the sysctl table |
| 2800 | * @write: %TRUE if this is a write to the sysctl file | 2838 | * @write: %TRUE if this is a write to the sysctl file |
| 2801 | * @filp: the file structure | ||
| 2802 | * @buffer: the user buffer | 2839 | * @buffer: the user buffer |
| 2803 | * @lenp: the size of the user buffer | 2840 | * @lenp: the size of the user buffer |
| 2804 | * @ppos: pointer to the file position | 2841 | * @ppos: pointer to the file position |
| @@ -2810,10 +2847,10 @@ int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, | |||
| 2810 | * | 2847 | * |
| 2811 | * Returns 0 on success. | 2848 | * Returns 0 on success. |
| 2812 | */ | 2849 | */ |
| 2813 | int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file *filp, | 2850 | int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, |
| 2814 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2851 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2815 | { | 2852 | { |
| 2816 | return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, | 2853 | return do_proc_dointvec(table,write,buffer,lenp,ppos, |
| 2817 | do_proc_dointvec_userhz_jiffies_conv,NULL); | 2854 | do_proc_dointvec_userhz_jiffies_conv,NULL); |
| 2818 | } | 2855 | } |
| 2819 | 2856 | ||
| @@ -2821,7 +2858,6 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file | |||
| 2821 | * 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 |
| 2822 | * @table: the sysctl table | 2859 | * @table: the sysctl table |
| 2823 | * @write: %TRUE if this is a write to the sysctl file | 2860 | * @write: %TRUE if this is a write to the sysctl file |
| 2824 | * @filp: the file structure | ||
| 2825 | * @buffer: the user buffer | 2861 | * @buffer: the user buffer |
| 2826 | * @lenp: the size of the user buffer | 2862 | * @lenp: the size of the user buffer |
| 2827 | * @ppos: file position | 2863 | * @ppos: file position |
| @@ -2834,14 +2870,14 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file | |||
| 2834 | * | 2870 | * |
| 2835 | * Returns 0 on success. | 2871 | * Returns 0 on success. |
| 2836 | */ | 2872 | */ |
| 2837 | int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, struct file *filp, | 2873 | int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, |
| 2838 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2874 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2839 | { | 2875 | { |
| 2840 | return do_proc_dointvec(table, write, filp, buffer, lenp, ppos, | 2876 | return do_proc_dointvec(table, write, buffer, lenp, ppos, |
| 2841 | do_proc_dointvec_ms_jiffies_conv, NULL); | 2877 | do_proc_dointvec_ms_jiffies_conv, NULL); |
| 2842 | } | 2878 | } |
| 2843 | 2879 | ||
| 2844 | static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp, | 2880 | static int proc_do_cad_pid(struct ctl_table *table, int write, |
| 2845 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2881 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2846 | { | 2882 | { |
| 2847 | struct pid *new_pid; | 2883 | struct pid *new_pid; |
| @@ -2850,7 +2886,7 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp | |||
| 2850 | 2886 | ||
| 2851 | tmp = pid_vnr(cad_pid); | 2887 | tmp = pid_vnr(cad_pid); |
| 2852 | 2888 | ||
| 2853 | r = __do_proc_dointvec(&tmp, table, write, filp, buffer, | 2889 | r = __do_proc_dointvec(&tmp, table, write, buffer, |
| 2854 | lenp, ppos, NULL, NULL); | 2890 | lenp, ppos, NULL, NULL); |
| 2855 | if (r || !write) | 2891 | if (r || !write) |
| 2856 | return r; | 2892 | return r; |
| @@ -2865,50 +2901,49 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp | |||
| 2865 | 2901 | ||
| 2866 | #else /* CONFIG_PROC_FS */ | 2902 | #else /* CONFIG_PROC_FS */ |
| 2867 | 2903 | ||
| 2868 | int proc_dostring(struct ctl_table *table, int write, struct file *filp, | 2904 | int proc_dostring(struct ctl_table *table, int write, |
| 2869 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2905 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2870 | { | 2906 | { |
| 2871 | return -ENOSYS; | 2907 | return -ENOSYS; |
| 2872 | } | 2908 | } |
| 2873 | 2909 | ||
| 2874 | int proc_dointvec(struct ctl_table *table, int write, struct file *filp, | 2910 | int proc_dointvec(struct ctl_table *table, int write, |
| 2875 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2911 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2876 | { | 2912 | { |
| 2877 | return -ENOSYS; | 2913 | return -ENOSYS; |
| 2878 | } | 2914 | } |
| 2879 | 2915 | ||
| 2880 | int proc_dointvec_minmax(struct ctl_table *table, int write, struct file *filp, | 2916 | int proc_dointvec_minmax(struct ctl_table *table, int write, |
| 2881 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2917 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2882 | { | 2918 | { |
| 2883 | return -ENOSYS; | 2919 | return -ENOSYS; |
| 2884 | } | 2920 | } |
| 2885 | 2921 | ||
| 2886 | int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, | 2922 | int proc_dointvec_jiffies(struct ctl_table *table, int write, |
| 2887 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2923 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2888 | { | 2924 | { |
| 2889 | return -ENOSYS; | 2925 | return -ENOSYS; |
| 2890 | } | 2926 | } |
| 2891 | 2927 | ||
| 2892 | int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file *filp, | 2928 | int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, |
| 2893 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2929 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2894 | { | 2930 | { |
| 2895 | return -ENOSYS; | 2931 | return -ENOSYS; |
| 2896 | } | 2932 | } |
| 2897 | 2933 | ||
| 2898 | int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, struct file *filp, | 2934 | int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, |
| 2899 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2935 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2900 | { | 2936 | { |
| 2901 | return -ENOSYS; | 2937 | return -ENOSYS; |
| 2902 | } | 2938 | } |
| 2903 | 2939 | ||
| 2904 | int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp, | 2940 | int proc_doulongvec_minmax(struct ctl_table *table, int write, |
| 2905 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2941 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 2906 | { | 2942 | { |
| 2907 | return -ENOSYS; | 2943 | return -ENOSYS; |
| 2908 | } | 2944 | } |
| 2909 | 2945 | ||
| 2910 | int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, | 2946 | int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, |
| 2911 | struct file *filp, | ||
| 2912 | void __user *buffer, | 2947 | void __user *buffer, |
| 2913 | size_t *lenp, loff_t *ppos) | 2948 | size_t *lenp, loff_t *ppos) |
| 2914 | { | 2949 | { |
