Index: generic/include/mm/slab.h
===================================================================
--- generic/include/mm/slab.h	(revision c4e45073fbe4143fbb4ab29aa6875ecdc374466e)
+++ generic/include/mm/slab.h	(revision 2cb5e6478ff8e1d5cf947da6398d6e2d496c27e4)
@@ -79,5 +79,5 @@
 	link_t link;
 	/* Configuration */
-	size_t size;      /**< Size of SLAB position - align_up(sizeof(obj)) */
+	size_t size;      /**< Size of slab position - align_up(sizeof(obj)) */
 	int (*constructor)(void *obj, int kmflag);
 	int (*destructor)(void *obj);
@@ -92,5 +92,5 @@
 	atomic_t allocated_objs;
 	atomic_t cached_objs;
-	atomic_t magazine_counter; /*<< How many magazines in magazines list */
+	atomic_t magazine_counter; /**< How many magazines in magazines list */
 
 	/* Slabs */
@@ -118,12 +118,12 @@
 extern count_t slab_reclaim(int flags);
 
-/** Initialize SLAB subsytem */
+/** Initialize slab subsytem */
 extern void slab_cache_init(void);
 extern void slab_enable_cpucache(void);
 
-/* KConsole debug */
+/* kconsole debug */
 extern void slab_print_list(void);
 
-/* Malloc support */
+/* malloc support */
 extern void * malloc(unsigned int size, int flags);
 extern void free(void *obj);
Index: generic/include/proc/thread.h
===================================================================
--- generic/include/proc/thread.h	(revision c4e45073fbe4143fbb4ab29aa6875ecdc374466e)
+++ generic/include/proc/thread.h	(revision 2cb5e6478ff8e1d5cf947da6398d6e2d496c27e4)
@@ -38,4 +38,5 @@
 #include <time/timeout.h>
 #include <synch/rwlock.h>
+#include <synch/synch.h>
 #include <config.h>
 #include <adt/btree.h>
@@ -155,4 +156,5 @@
 extern void thread_usleep(__u32 usec);
 
+#define thread_join(t)	thread_join_timeout((t), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
 extern int thread_join_timeout(thread_t *t, __u32 usec, int flags);
 extern void thread_detach(thread_t *t);
Index: generic/src/main/kinit.c
===================================================================
--- generic/src/main/kinit.c	(revision c4e45073fbe4143fbb4ab29aa6875ecdc374466e)
+++ generic/src/main/kinit.c	(revision 2cb5e6478ff8e1d5cf947da6398d6e2d496c27e4)
@@ -83,4 +83,9 @@
 	task_t *utask;
 
+	/*
+	 * Detach kinit as nobody will call thread_join_timeout() on it.
+	 */
+	thread_detach(THREAD);
+
 	interrupts_disable();
 
@@ -99,7 +104,9 @@
 			spinlock_unlock(&t->lock);
 			thread_ready(t);
-			waitq_sleep(&kmp_completion_wq);
 		}
-		else panic("thread_create/kmp\n");
+		else {
+			panic("thread_create/kmp\n");
+		}
+		thread_join(t);
 	}
 #endif /* CONFIG_SMP */
Index: generic/src/proc/scheduler.c
===================================================================
--- generic/src/proc/scheduler.c	(revision c4e45073fbe4143fbb4ab29aa6875ecdc374466e)
+++ generic/src/proc/scheduler.c	(revision 2cb5e6478ff8e1d5cf947da6398d6e2d496c27e4)
@@ -517,4 +517,9 @@
 	ipl_t ipl;
 
+	/*
+	 * Detach kcpulb as nobody will call thread_join_timeout() on it.
+	 */
+	thread_detach(THREAD);
+	
 loop:
 	/*
