diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 17 | ||||
-rw-r--r-- | init/do_mounts_initrd.c | 3 | ||||
-rw-r--r-- | init/do_mounts_md.c | 8 | ||||
-rw-r--r-- | init/main.c | 6 | ||||
-rw-r--r-- | init/version.c | 23 |
5 files changed, 37 insertions, 20 deletions
diff --git a/init/Kconfig b/init/Kconfig index f7a04d0daf077..10382931eead5 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -115,6 +115,15 @@ config SYSVIPC section 6.4 of the Linux Programmer's Guide, available from <http://www.tldp.org/guides.html>. +config IPC_NS + bool "IPC Namespaces" + depends on SYSVIPC + default n + help + Support ipc namespaces. This allows containers, i.e. virtual + environments, to use ipc namespaces to provide different ipc + objects for different servers. If unsure, say N. + config POSIX_MQUEUE bool "POSIX Message Queues" depends on NET && EXPERIMENTAL @@ -182,6 +191,14 @@ config TASK_DELAY_ACCT Say N if unsure. +config UTS_NS + bool "UTS Namespaces" + default n + help + Support uts namespaces. This allows containers, i.e. + vservers, to use uts namespaces to provide different + uts info for different servers. If unsure, say N. + config AUDIT bool "Auditing support" depends on NET diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index a06f037fa000a..919a80cb322e6 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -1,4 +1,3 @@ -#define __KERNEL_SYSCALLS__ #include <linux/unistd.h> #include <linux/kernel.h> #include <linux/fs.h> @@ -35,7 +34,7 @@ static int __init do_linuxrc(void * shell) (void) sys_open("/dev/console",O_RDWR,0); (void) sys_dup(0); (void) sys_dup(0); - return execve(shell, argv, envp_init); + return kernel_execve(shell, argv, envp_init); } static void __init handle_initrd(void) diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index 2429e1bf8c60a..753dc54a66497 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c @@ -20,7 +20,7 @@ static struct { int level; int chunk; char *device_names; -} md_setup_args[MAX_MD_DEVS] __initdata; +} md_setup_args[256] __initdata; static int md_setup_ents __initdata; @@ -61,10 +61,6 @@ static int __init md_setup(char *str) return 0; } str1 = str; - if (minor >= MAX_MD_DEVS) { - printk(KERN_WARNING "md: md=%d, Minor device number too high.\n", minor); - return 0; - } for (ent=0 ; ent< md_setup_ents ; ent++) if (md_setup_args[ent].minor == minor && md_setup_args[ent].partitioned == partitioned) { @@ -72,7 +68,7 @@ static int __init md_setup(char *str) "Replacing previous definition.\n", partitioned?"d":"", minor); break; } - if (ent >= MAX_MD_DEVS) { + if (ent >= ARRAY_SIZE(md_setup_args)) { printk(KERN_WARNING "md: md=%s%d - too many md initialisations\n", partitioned?"d":"", minor); return 0; } diff --git a/init/main.c b/init/main.c index 0766e69712b2a..ee123243fb530 100644 --- a/init/main.c +++ b/init/main.c @@ -9,8 +9,6 @@ * Simplified starting of init: Michael A. Griffith <grif@acm.org> */ -#define __KERNEL_SYSCALLS__ - #include <linux/types.h> #include <linux/module.h> #include <linux/proc_fs.h> @@ -703,7 +701,7 @@ static void do_pre_smp_initcalls(void) static void run_init_process(char *init_filename) { argv_init[0] = init_filename; - execve(init_filename, argv_init, envp_init); + kernel_execve(init_filename, argv_init, envp_init); } static int init(void * unused) @@ -723,6 +721,8 @@ static int init(void * unused) */ child_reaper = current; + cad_pid = task_pid(current); + smp_prepare_cpus(max_cpus); do_pre_smp_initcalls(); diff --git a/init/version.c b/init/version.c index e290802c6bd2c..8f28344d9c70f 100644 --- a/init/version.c +++ b/init/version.c @@ -12,22 +12,27 @@ #include <linux/utsname.h> #include <linux/utsrelease.h> #include <linux/version.h> +#include <linux/sched.h> #define version(a) Version_ ## a #define version_string(a) version(a) int version_string(LINUX_VERSION_CODE); -struct new_utsname system_utsname = { - .sysname = UTS_SYSNAME, - .nodename = UTS_NODENAME, - .release = UTS_RELEASE, - .version = UTS_VERSION, - .machine = UTS_MACHINE, - .domainname = UTS_DOMAINNAME, +struct uts_namespace init_uts_ns = { + .kref = { + .refcount = ATOMIC_INIT(2), + }, + .name = { + .sysname = UTS_SYSNAME, + .nodename = UTS_NODENAME, + .release = UTS_RELEASE, + .version = UTS_VERSION, + .machine = UTS_MACHINE, + .domainname = UTS_DOMAINNAME, + }, }; - -EXPORT_SYMBOL(system_utsname); +EXPORT_SYMBOL_GPL(init_uts_ns); const char linux_banner[] = "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" |