summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-08-31 04:35:02 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-08-31 04:35:02 -0700
commit322bb6165ae3a6c17f932e4982d539bdbcdd3a36 (patch)
tree939edf7e74cec834f97073d1c30ea47a62c2a5df /init
parentab05d4ab09e5256b2cd3f6da448349937069907b (diff)
[PATCH] ipc_init() uses vmalloc too early
From: Andrea Arcangeli <andrea@suse.de> aka: "vmalloc allocations in ipc needs smp initialized (and vm must be allowed to schedule in 2.6)" In short if you change SEMMNI to 8192 the kernel will crash at boot, beause it tries to call vmalloc before the smp is initialized. The reason is that vmalloc calls into the pte alloc code, and the fast pte alloc is tried first, but that reads into the pte_quicklist, that requires the cpu_data to be initialized (and that happens in smp_init()). the patch is obviously safe, since no piece of kernel (especially the code in the check_bugs and smp_init paths ;) calls into the ipc subsystem. The reason this started to trigger wasn't really that we increased SEMMNI, but what happend is that some IPC data structure grown, and for some reason the corruption due the uninitalized pte_quicklist triggers only for smp boxes with less than 1G (not very common anymore ;). So it wasn't immediatly reproducible on all setups. 2.6 doesn't suffer from the same problem, simply because 2.6 isn't using the quicklist anymore, but I think it would be much more correct to make the same change in 2.6 too, since whatever cond_resched() in the vm paths (and they're definitely allowed to call it), will lead to a crash since the init task isn't initialized and the scheduler can't be invoked yet. (and 2.6 already has the bigger data structures that should trigger the vmalloc all the time on all setups)
Diffstat (limited to 'init')
-rw-r--r--init/main.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/init/main.c b/init/main.c
index 719e2dc5dbec..5fcc07e33a39 100644
--- a/init/main.c
+++ b/init/main.c
@@ -89,10 +89,6 @@ extern void driver_init(void);
extern void tc_init(void);
#endif
-#if defined(CONFIG_SYSVIPC)
-extern void ipc_init(void);
-#endif
-
/*
* Are we up and running (ie do we have all the infrastructure
* set up)
@@ -449,9 +445,6 @@ asmlinkage void __init start_kernel(void)
#ifdef CONFIG_PROC_FS
proc_root_init();
#endif
-#if defined(CONFIG_SYSVIPC)
- ipc_init();
-#endif
check_bugs();
printk("POSIX conformance testing by UNIFIX\n");