Skip to content

Commit

Permalink
sh: Fix up thread info pointer in syscall_badsys resume path.
Browse files Browse the repository at this point in the history
Entry to resume_userspace expects r8 to contain current_thread_info,
which happens in all paths except for syscall_badsys, where r8 was
being inadvertently trampled. Reload it before the branch.

Signed-off-by: Hideo Saito <saito@densan.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Hideo Saito authored and Paul Mundt committed May 16, 2008
1 parent e08b954 commit 561c2bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/sh/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ __restore_all:

.align 2
syscall_badsys: ! Bad syscall number
get_current_thread_info r8, r0
mov #-ENOSYS, r0
bra resume_userspace
mov.l r0, @(OFF_R0,r15) ! Return value
Expand Down

0 comments on commit 561c2bc

Please sign in to comment.