diff options
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index ce664f98e3fb..62e4ff9968b5 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
| @@ -27,6 +27,7 @@ | |||
| 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> | 29 | #include <linux/utsname.h> |
| 30 | #include <linux/kmemcheck.h> | ||
| 30 | #include <linux/smp_lock.h> | 31 | #include <linux/smp_lock.h> |
| 31 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
| 32 | #include <linux/init.h> | 33 | #include <linux/init.h> |
| @@ -328,6 +329,14 @@ static struct ctl_table kern_table[] = { | |||
| 328 | .mode = 0644, | 329 | .mode = 0644, |
| 329 | .proc_handler = &proc_dointvec, | 330 | .proc_handler = &proc_dointvec, |
| 330 | }, | 331 | }, |
| 332 | { | ||
| 333 | .ctl_name = CTL_UNNUMBERED, | ||
| 334 | .procname = "timer_migration", | ||
| 335 | .data = &sysctl_timer_migration, | ||
| 336 | .maxlen = sizeof(unsigned int), | ||
| 337 | .mode = 0644, | ||
| 338 | .proc_handler = &proc_dointvec, | ||
| 339 | }, | ||
| 331 | #endif | 340 | #endif |
| 332 | { | 341 | { |
| 333 | .ctl_name = CTL_UNNUMBERED, | 342 | .ctl_name = CTL_UNNUMBERED, |
| @@ -959,6 +968,17 @@ static struct ctl_table kern_table[] = { | |||
| 959 | .proc_handler = &proc_dointvec, | 968 | .proc_handler = &proc_dointvec, |
| 960 | }, | 969 | }, |
| 961 | #endif | 970 | #endif |
| 971 | #ifdef CONFIG_KMEMCHECK | ||
| 972 | { | ||
| 973 | .ctl_name = CTL_UNNUMBERED, | ||
| 974 | .procname = "kmemcheck", | ||
| 975 | .data = &kmemcheck_enabled, | ||
| 976 | .maxlen = sizeof(int), | ||
| 977 | .mode = 0644, | ||
| 978 | .proc_handler = &proc_dointvec, | ||
| 979 | }, | ||
| 980 | #endif | ||
| 981 | |||
| 962 | /* | 982 | /* |
| 963 | * NOTE: do not add new entries to this table unless you have read | 983 | * NOTE: do not add new entries to this table unless you have read |
| 964 | * Documentation/sysctl/ctl_unnumbered.txt | 984 | * Documentation/sysctl/ctl_unnumbered.txt |
| @@ -1317,7 +1337,6 @@ static struct ctl_table vm_table[] = { | |||
| 1317 | .extra2 = &one, | 1337 | .extra2 = &one, |
| 1318 | }, | 1338 | }, |
| 1319 | #endif | 1339 | #endif |
| 1320 | #ifdef CONFIG_UNEVICTABLE_LRU | ||
| 1321 | { | 1340 | { |
| 1322 | .ctl_name = CTL_UNNUMBERED, | 1341 | .ctl_name = CTL_UNNUMBERED, |
| 1323 | .procname = "scan_unevictable_pages", | 1342 | .procname = "scan_unevictable_pages", |
| @@ -1326,7 +1345,6 @@ static struct ctl_table vm_table[] = { | |||
| 1326 | .mode = 0644, | 1345 | .mode = 0644, |
| 1327 | .proc_handler = &scan_unevictable_handler, | 1346 | .proc_handler = &scan_unevictable_handler, |
| 1328 | }, | 1347 | }, |
| 1329 | #endif | ||
| 1330 | /* | 1348 | /* |
| 1331 | * NOTE: do not add new entries to this table unless you have read | 1349 | * NOTE: do not add new entries to this table unless you have read |
| 1332 | * Documentation/sysctl/ctl_unnumbered.txt | 1350 | * Documentation/sysctl/ctl_unnumbered.txt |
| @@ -2265,7 +2283,7 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, | |||
| 2265 | void *data) | 2283 | void *data) |
| 2266 | { | 2284 | { |
| 2267 | #define TMPBUFLEN 21 | 2285 | #define TMPBUFLEN 21 |
| 2268 | int *i, vleft, first=1, neg, val; | 2286 | int *i, vleft, first = 1, neg; |
| 2269 | unsigned long lval; | 2287 | unsigned long lval; |
| 2270 | size_t left, len; | 2288 | size_t left, len; |
| 2271 | 2289 | ||
| @@ -2318,8 +2336,6 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, | |||
| 2318 | len = p-buf; | 2336 | len = p-buf; |
| 2319 | if ((len < left) && *p && !isspace(*p)) | 2337 | if ((len < left) && *p && !isspace(*p)) |
| 2320 | break; | 2338 | break; |
| 2321 | if (neg) | ||
| 2322 | val = -val; | ||
| 2323 | s += len; | 2339 | s += len; |
| 2324 | left -= len; | 2340 | left -= len; |
| 2325 | 2341 | ||
