author: Jeff Dike <jdike@addtoit.com> 2008-02-04 22:30:57 -0800
committer: Linus Torvalds <torvalds@woody.linux-foundation.org> 2008-02-05 09:44:28 -0800
commit: d25f2e1235aab716c9fd6ba36c42503627a3a0e3
parent: ee3d9bd4de1ed93d2a7ee41c331ed30a1c7b8acd
Commit Summary:
Diffstat:
1 file changed, 8 insertions, 3 deletions
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 2cc2071112bc..7dc24e3cb190 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -300,7 +300,9 @@ void userspace(struct uml_pt_regs *regs)
nsecs += os_nsecs();
while (1) {
- restore_registers(pid, regs);
+ if (ptrace(PTRACE_SETREGS, pid, 0, regs->gp))
+ panic("userspace - PTRACE_SETREGS failed, "
+ "errno = %d\n", errno);
/* Now we set local_using_sysemu to be used for one loop */
local_using_sysemu = get_using_sysemu();
@@ -320,7 +322,10 @@ void userspace(struct uml_pt_regs *regs)
errno);
regs->is_user = 1;
- save_registers(pid, regs);
+ if (ptrace(PTRACE_GETREGS, pid, 0, regs->gp))
+ panic("userspace - saving registers failed, "
+ "errno = %d\n", errno);
+
UPT_SYSCALL_NR(regs) = -1; /* Assume: It's not a syscall */
if (WIFSTOPPED(status)) {
@@ -343,7 +348,7 @@ void userspace(struct uml_pt_regs *regs)
break;
case SIGVTALRM:
now = os_nsecs();
- if(now < nsecs)
+ if (now < nsecs)
break;
block_signals();
(*sig_info[sig])(sig, regs);