diff options
author | David Howells <dhowells@redhat.com> | 2013-05-28 15:21:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-30 00:38:48 -0400 |
commit | 1e00227d4e8017ac9c3f73bf949a06c6e27f5122 (patch) | |
tree | 4c95be672e90ea282807a2d8d30367d550d0b5e8 /arch/mn10300 | |
parent | e4aa937ec75df0eea0bee03bffa3303ad36c986b (diff) |
MN10300: Fix ret_from_kernel_thread
ret_from_kernel_thread needs to set A2 to the thread_info pointer before
jumping to syscall_exit.
Without this, we never correctly start userspace.
This was caused by the rejuggling of the fork/exec paths in commit
ddf23e87a804 ("mn10300: switch to saner kernel_execve() semantics")
Reported-by: Ken Cox <jkc@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Ken Cox <jkc@redhat.com>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mn10300')
-rw-r--r-- | arch/mn10300/kernel/entry.S | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S index 68fcab8f8f6f..942005753720 100644 --- a/arch/mn10300/kernel/entry.S +++ b/arch/mn10300/kernel/entry.S | |||
@@ -60,6 +60,7 @@ ENTRY(ret_from_kernel_thread) | |||
60 | mov (REG_D0,fp),d0 | 60 | mov (REG_D0,fp),d0 |
61 | mov (REG_A0,fp),a0 | 61 | mov (REG_A0,fp),a0 |
62 | calls (a0) | 62 | calls (a0) |
63 | GET_THREAD_INFO a2 # A2 must be set on return from sys_exit() | ||
63 | clr d0 | 64 | clr d0 |
64 | mov d0,(REG_D0,fp) | 65 | mov d0,(REG_D0,fp) |
65 | jmp syscall_exit | 66 | jmp syscall_exit |