upgrade to linux 2.6.10-1.12_FC2
[linux-2.6.git] / kernel / sysctl.c
index c4aaa14..0034057 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/times.h>
 #include <linux/limits.h>
 #include <linux/dcache.h>
+#include <linux/syscalls.h>
 
 #include <asm/uaccess.h>
 #include <asm/processor.h>
@@ -66,8 +67,9 @@ extern int sysctl_lower_zone_protection;
 extern int min_free_kbytes;
 extern int printk_ratelimit_jiffies;
 extern int printk_ratelimit_burst;
+extern int pid_max_min, pid_max_max;
 
-#if defined(CONFIG_X86_LOCAL_APIC) && defined(__i386__)
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)
 int unknown_nmi_panic;
 extern int proc_unknown_nmi_panic(ctl_table *, int, struct file *,
                                  void __user *, size_t *, loff_t *);
@@ -451,7 +453,7 @@ static ctl_table kern_table[] = {
                .ctl_name       = KERN_HOTPLUG,
                .procname       = "hotplug",
                .data           = &hotplug_path,
-               .maxlen         = KMOD_PATH_LEN,
+               .maxlen         = HOTPLUG_PATH_LEN,
                .mode           = 0644,
                .proc_handler   = &proc_dostring,
                .strategy       = &sysctl_string,
@@ -642,7 +644,10 @@ static ctl_table kern_table[] = {
                .data           = &pid_max,
                .maxlen         = sizeof (int),
                .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
+               .proc_handler   = &proc_dointvec_minmax,
+               .strategy       = sysctl_intvec,
+               .extra1         = &pid_max_min,
+               .extra2         = &pid_max_max,
        },
        {
                .ctl_name       = KERN_PANIC_ON_OOPS,
@@ -677,7 +682,7 @@ static ctl_table kern_table[] = {
                .mode           = 0444,
                .proc_handler   = &proc_dointvec,
        },
-#if defined(CONFIG_X86_LOCAL_APIC) && defined(__i386__)
+#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)
        {
                .ctl_name       = KERN_UNKNOWN_NMI_PANIC,
                .procname       = "unknown_nmi_panic",
@@ -875,6 +880,17 @@ static ctl_table vm_table[] = {
                .strategy       = &sysctl_intvec,
                .extra1         = &zero,
        },
+#endif
+#ifdef CONFIG_SWAP
+       {
+               .ctl_name       = VM_SWAP_TOKEN_TIMEOUT,
+               .procname       = "swap_token_timeout",
+               .data           = &swap_token_default_timeout,
+               .maxlen         = sizeof(swap_token_default_timeout),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_jiffies,
+               .strategy       = &sysctl_jiffies,
+       },
 #endif
        { .ctl_name = 0 }
 };
@@ -954,6 +970,7 @@ static ctl_table fs_table[] = {
                .mode           = 0644,
                .proc_handler   = &proc_dointvec,
        },
+#ifdef CONFIG_DNOTIFY
        {
                .ctl_name       = FS_DIR_NOTIFY,
                .procname       = "dir-notify-enable",
@@ -962,6 +979,7 @@ static ctl_table fs_table[] = {
                .mode           = 0644,
                .proc_handler   = &proc_dointvec,
        },
+#endif
        {
                .ctl_name       = FS_LEASE_TIME,
                .procname       = "lease-break-time",