make sure that we always have a return path from kernel_execve()
[deliverable/linux.git] / init / main.c
index b28673087ac006e79f4563b1a06d39eb1b163d37..a490ffecb7b9e245d0c96da7c2f19410a1913ceb 100644 (file)
@@ -794,11 +794,11 @@ static void run_init_process(const char *init_filename)
        kernel_execve(init_filename, argv_init, envp_init);
 }
 
-/* This is a non __init function. Force it to be noinline otherwise gcc
- * makes it inline to init() and it becomes part of init.text section
- */
-static noinline int init_post(void)
+static void __init kernel_init_freeable(void);
+
+static int __ref kernel_init(void *unused)
 {
+       kernel_init_freeable();
        /* need to finish all async __init code before freeing the memory */
        async_synchronize_full();
        free_initmem();
@@ -835,7 +835,7 @@ static noinline int init_post(void)
              "See Linux Documentation/init.txt for guidance.");
 }
 
-static int __init kernel_init(void * unused)
+static void __init kernel_init_freeable(void)
 {
        /*
         * Wait until kthreadd is all set-up.
@@ -890,7 +890,4 @@ static int __init kernel_init(void * unused)
         * we're essentially up and running. Get rid of the
         * initmem segments and start the user-mode stuff..
         */
-
-       init_post();
-       return 0;
 }
This page took 0.028006 seconds and 5 git commands to generate.