aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c38
1 files changed, 34 insertions, 4 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 701d12c63068..3e0bbee549ea 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -58,6 +58,7 @@ extern int sysctl_overcommit_ratio;
58extern int max_threads; 58extern int max_threads;
59extern int sysrq_enabled; 59extern int sysrq_enabled;
60extern int core_uses_pid; 60extern int core_uses_pid;
61extern int suid_dumpable;
61extern char core_pattern[]; 62extern char core_pattern[];
62extern int cad_pid; 63extern int cad_pid;
63extern int pid_max; 64extern int pid_max;
@@ -113,6 +114,7 @@ extern int unaligned_enabled;
113extern int sysctl_ieee_emulation_warnings; 114extern int sysctl_ieee_emulation_warnings;
114#endif 115#endif
115extern int sysctl_userprocess_debug; 116extern int sysctl_userprocess_debug;
117extern int spin_retry;
116#endif 118#endif
117 119
118extern int sysctl_hz_timer; 120extern int sysctl_hz_timer;
@@ -145,6 +147,9 @@ extern ctl_table random_table[];
145#ifdef CONFIG_UNIX98_PTYS 147#ifdef CONFIG_UNIX98_PTYS
146extern ctl_table pty_table[]; 148extern ctl_table pty_table[];
147#endif 149#endif
150#ifdef CONFIG_INOTIFY
151extern ctl_table inotify_table[];
152#endif
148 153
149#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT 154#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
150int sysctl_legacy_va_layout; 155int sysctl_legacy_va_layout;
@@ -217,6 +222,7 @@ static ctl_table root_table[] = {
217 .mode = 0555, 222 .mode = 0555,
218 .child = dev_table, 223 .child = dev_table,
219 }, 224 },
225
220 { .ctl_name = 0 } 226 { .ctl_name = 0 }
221}; 227};
222 228
@@ -642,7 +648,16 @@ static ctl_table kern_table[] = {
642 .mode = 0644, 648 .mode = 0644,
643 .proc_handler = &proc_dointvec, 649 .proc_handler = &proc_dointvec,
644 }, 650 },
645 651#if defined(CONFIG_ARCH_S390)
652 {
653 .ctl_name = KERN_SPIN_RETRY,
654 .procname = "spin_retry",
655 .data = &spin_retry,
656 .maxlen = sizeof (int),
657 .mode = 0644,
658 .proc_handler = &proc_dointvec,
659 },
660#endif
646 { .ctl_name = 0 } 661 { .ctl_name = 0 }
647}; 662};
648 663
@@ -949,7 +964,23 @@ static ctl_table fs_table[] = {
949 .mode = 0644, 964 .mode = 0644,
950 .proc_handler = &proc_dointvec, 965 .proc_handler = &proc_dointvec,
951 }, 966 },
967#ifdef CONFIG_INOTIFY
968 {
969 .ctl_name = FS_INOTIFY,
970 .procname = "inotify",
971 .mode = 0555,
972 .child = inotify_table,
973 },
974#endif
952#endif 975#endif
976 {
977 .ctl_name = KERN_SETUID_DUMPABLE,
978 .procname = "suid_dumpable",
979 .data = &suid_dumpable,
980 .maxlen = sizeof(int),
981 .mode = 0644,
982 .proc_handler = &proc_dointvec,
983 },
953 { .ctl_name = 0 } 984 { .ctl_name = 0 }
954}; 985};
955 986
@@ -959,7 +990,7 @@ static ctl_table debug_table[] = {
959 990
960static ctl_table dev_table[] = { 991static ctl_table dev_table[] = {
961 { .ctl_name = 0 } 992 { .ctl_name = 0 }
962}; 993};
963 994
964extern void init_irq_proc (void); 995extern void init_irq_proc (void);
965 996
@@ -991,8 +1022,7 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol
991 int error = parse_table(name, nlen, oldval, oldlenp, 1022 int error = parse_table(name, nlen, oldval, oldlenp,
992 newval, newlen, head->ctl_table, 1023 newval, newlen, head->ctl_table,
993 &context); 1024 &context);
994 if (context) 1025 kfree(context);
995 kfree(context);
996 if (error != -ENOTDIR) 1026 if (error != -ENOTDIR)
997 return error; 1027 return error;
998 tmp = tmp->next; 1028 tmp = tmp->next;