summaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-19 22:10:26 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-19 22:10:26 -0800
commitece8e0b2f9c980e5511fe8db2d68c6f1859b9d83 (patch)
tree70f1e3363080884965686576d079d24da8863a58 /init/main.c
parent67cb104b4c30bd52292b6a7f526349aab2dd5cbd (diff)
parenta0327ff0eda915be623658babacef706099c11a8 (diff)
downloadlinux-stable-ece8e0b2f9c980e5511fe8db2d68c6f1859b9d83.tar.gz
linux-stable-ece8e0b2f9c980e5511fe8db2d68c6f1859b9d83.tar.bz2
linux-stable-ece8e0b2f9c980e5511fe8db2d68c6f1859b9d83.zip
Merge branch 'for-3.9-async' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull async changes from Tejun Heo: "These are followups for the earlier deadlock issue involving async ending up waiting for itself through block requesting module[1]. The following changes are made by these commits. - Instead of requesting default elevator on each request_queue init, block now requests it once early during boot. - Kmod triggers warning if invoked from an async worker. - Async synchronization implementation has been reimplemented. It's a lot simpler now." * 'for-3.9-async' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: async: initialise list heads to fix crash async: replace list of active domains with global list of pending items async: keep pending tasks on async_domain and remove async_pending async: use ULLONG_MAX for infinity cookie value async: bring sanity to the use of words domain and running async, kmod: warn on synchronous request_module() from async workers block: don't request module during elevator init init, block: try to load default elevator module early during boot
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index cee4b5c66d81..63534a141b4e 100644
--- a/init/main.c
+++ b/init/main.c
@@ -70,6 +70,8 @@
#include <linux/perf_event.h>
#include <linux/file.h>
#include <linux/ptrace.h>
+#include <linux/blkdev.h>
+#include <linux/elevator.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -794,6 +796,17 @@ static void __init do_pre_smp_initcalls(void)
do_one_initcall(*fn);
}
+/*
+ * This function requests modules which should be loaded by default and is
+ * called twice right after initrd is mounted and right before init is
+ * exec'd. If such modules are on either initrd or rootfs, they will be
+ * loaded before control is passed to userland.
+ */
+void __init load_default_modules(void)
+{
+ load_default_elevator_module();
+}
+
static int run_init_process(const char *init_filename)
{
argv_init[0] = init_filename;
@@ -900,4 +913,7 @@ static noinline void __init kernel_init_freeable(void)
* we're essentially up and running. Get rid of the
* initmem segments and start the user-mode stuff..
*/
+
+ /* rootfs is available now, try loading default modules */
+ load_default_modules();
}