Skip to content

Commit

Permalink
MN10300: Fix ret_from_kernel_thread
Browse files Browse the repository at this point in the history
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
ddf23e8 ("mn10300: switch to saner kernel_execve() semantics")

Reported-by: Ken Cox <[email protected]>
Signed-off-by: David Howells <[email protected]>
Acked-by: Ken Cox <[email protected]>
Acked-by: Al Viro <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dhowells authored and torvalds committed May 30, 2013
1 parent e4aa937 commit 1e00227
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/mn10300/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ ENTRY(ret_from_kernel_thread)
mov (REG_D0,fp),d0
mov (REG_A0,fp),a0
calls (a0)
GET_THREAD_INFO a2 # A2 must be set on return from sys_exit()
clr d0
mov d0,(REG_D0,fp)
jmp syscall_exit
Expand Down

0 comments on commit 1e00227

Please sign in to comment.