[RFC PATCH 12/28] init: allow architecture code to overide run_init_process

From: Octavian Purdila
Date: Tue Nov 03 2015 - 15:24:14 EST


This is needed for arch/lkl where where execve can not be implemented
and init only runs in kernel space.

Signed-off-by: Octavian Purdila <octavian.purdila@xxxxxxxxx>
---
init/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/init/main.c b/init/main.c
index 9e64d70..efd8f7c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -905,13 +905,15 @@ void __init load_default_modules(void)
load_default_elevator_module();
}

-static int run_init_process(const char *init_filename)
+#ifndef ARCH_RUN_INIT_PROCESS
+int run_init_process(const char *init_filename)
{
argv_init[0] = init_filename;
return do_execve(getname_kernel(init_filename),
(const char __user *const __user *)argv_init,
(const char __user *const __user *)envp_init);
}
+#endif

static int try_to_run_init_process(const char *init_filename)
{
--
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/