summaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux
diff options
context:
space:
mode:
authorThomas Meyer <thomas@m3y3r.de>2015-03-28 09:59:46 +0100
committerRichard Weinberger <richard@nod.at>2015-04-13 21:17:44 +0200
commit33bbc3065414722065a20cbdbeaf352173e72f39 (patch)
treef4cf1b3df0f7a23f80a9d14129ec8f8c1f14ad19 /arch/um/os-Linux
parent04a418495e0852263d77c4fb82adf470feaafef3 (diff)
downloadblackbird-op-linux-33bbc3065414722065a20cbdbeaf352173e72f39.tar.gz
blackbird-op-linux-33bbc3065414722065a20cbdbeaf352173e72f39.zip
um: Move uml_postsetup in the init_thread stack
atomic_notifier_chain_register() and uml_postsetup() do call kernel code that rely on the "current" kernel macro and a valid task_struct resp. thread_info struct. Give those functions a valid stack by moving uml_postsetup() in the init_thread stack. This moves enables a panic() call in this early code to generate a valid stacktrace, instead of crashing. E.g. when an UML kernel is started with an initrd but too few physical memory the panic() call get's actually processed. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/os-Linux')
-rw-r--r--arch/um/os-Linux/skas/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 50ebeae5cbb3..7a9777570a62 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -586,7 +586,7 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf)
n = setjmp(initial_jmpbuf);
switch (n) {
case INIT_JMP_NEW_THREAD:
- (*switch_buf)[0].JB_IP = (unsigned long) new_thread_handler;
+ (*switch_buf)[0].JB_IP = (unsigned long) uml_finishsetup;
(*switch_buf)[0].JB_SP = (unsigned long) stack +
UM_THREAD_SIZE - sizeof(void *);
break;
OpenPOWER on IntegriCloud