aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-03-07 18:55:06 -0500
committerJames Morris <jmorris@namei.org>2011-03-07 18:55:06 -0500
commit1cc26bada9f6807814806db2f0d78792eecdac71 (patch)
tree5509b5139db04af6c13db0a580c84116a4a54039 /kernel/sysctl.c
parenteae61f3c829439f8f9121b5cd48a14be04df451f (diff)
parent214d93b02c4fe93638ad268613c9702a81ed9192 (diff)
Merge branch 'master'; commit 'v2.6.38-rc7' into next
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ae5cbb1e3ced..0f1bd83db985 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -24,6 +24,7 @@
24#include <linux/slab.h> 24#include <linux/slab.h>
25#include <linux/sysctl.h> 25#include <linux/sysctl.h>
26#include <linux/signal.h> 26#include <linux/signal.h>
27#include <linux/printk.h>
27#include <linux/proc_fs.h> 28#include <linux/proc_fs.h>
28#include <linux/security.h> 29#include <linux/security.h>
29#include <linux/ctype.h> 30#include <linux/ctype.h>
@@ -169,7 +170,8 @@ static int proc_taint(struct ctl_table *table, int write,
169#endif 170#endif
170 171
171#ifdef CONFIG_MAGIC_SYSRQ 172#ifdef CONFIG_MAGIC_SYSRQ
172static int __sysrq_enabled; /* Note: sysrq code ises it's own private copy */ 173/* Note: sysrq code uses it's own private copy */
174static int __sysrq_enabled = SYSRQ_DEFAULT_ENABLE;
173 175
174static int sysrq_sysctl_handler(ctl_table *table, int write, 176static int sysrq_sysctl_handler(ctl_table *table, int write,
175 void __user *buffer, size_t *lenp, 177 void __user *buffer, size_t *lenp,
@@ -245,10 +247,6 @@ static struct ctl_table root_table[] = {
245 .mode = 0555, 247 .mode = 0555,
246 .child = dev_table, 248 .child = dev_table,
247 }, 249 },
248/*
249 * NOTE: do not add new entries to this table unless you have read
250 * Documentation/sysctl/ctl_unnumbered.txt
251 */
252 { } 250 { }
253}; 251};
254 252
@@ -710,6 +708,15 @@ static struct ctl_table kern_table[] = {
710 .extra1 = &zero, 708 .extra1 = &zero,
711 .extra2 = &one, 709 .extra2 = &one,
712 }, 710 },
711 {
712 .procname = "kptr_restrict",
713 .data = &kptr_restrict,
714 .maxlen = sizeof(int),
715 .mode = 0644,
716 .proc_handler = proc_dointvec_minmax,
717 .extra1 = &zero,
718 .extra2 = &two,
719 },
713#endif 720#endif
714 { 721 {
715 .procname = "ngroups_max", 722 .procname = "ngroups_max",
@@ -962,10 +969,6 @@ static struct ctl_table kern_table[] = {
962 .proc_handler = proc_dointvec, 969 .proc_handler = proc_dointvec,
963 }, 970 },
964#endif 971#endif
965/*
966 * NOTE: do not add new entries to this table unless you have read
967 * Documentation/sysctl/ctl_unnumbered.txt
968 */
969 { } 972 { }
970}; 973};
971 974
@@ -1326,11 +1329,6 @@ static struct ctl_table vm_table[] = {
1326 .extra2 = &one, 1329 .extra2 = &one,
1327 }, 1330 },
1328#endif 1331#endif
1329
1330/*
1331 * NOTE: do not add new entries to this table unless you have read
1332 * Documentation/sysctl/ctl_unnumbered.txt
1333 */
1334 { } 1332 { }
1335}; 1333};
1336 1334
@@ -1486,10 +1484,6 @@ static struct ctl_table fs_table[] = {
1486 .proc_handler = &pipe_proc_fn, 1484 .proc_handler = &pipe_proc_fn,
1487 .extra1 = &pipe_min_size, 1485 .extra1 = &pipe_min_size,
1488 }, 1486 },
1489/*
1490 * NOTE: do not add new entries to this table unless you have read
1491 * Documentation/sysctl/ctl_unnumbered.txt
1492 */
1493 { } 1487 { }
1494}; 1488};
1495 1489
@@ -2899,7 +2893,7 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
2899 } 2893 }
2900} 2894}
2901 2895
2902#else /* CONFIG_PROC_FS */ 2896#else /* CONFIG_PROC_SYSCTL */
2903 2897
2904int proc_dostring(struct ctl_table *table, int write, 2898int proc_dostring(struct ctl_table *table, int write,
2905 void __user *buffer, size_t *lenp, loff_t *ppos) 2899 void __user *buffer, size_t *lenp, loff_t *ppos)
@@ -2951,7 +2945,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
2951} 2945}
2952 2946
2953 2947
2954#endif /* CONFIG_PROC_FS */ 2948#endif /* CONFIG_PROC_SYSCTL */
2955 2949
2956/* 2950/*
2957 * No sense putting this after each symbol definition, twice, 2951 * No sense putting this after each symbol definition, twice,