Commit a0c257d9 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: don't rule out syscall_nr == 0

From: Bodo Stroesser <bstroesser@fujitsu-siemens.com>

Change the valid system call numbers to reflect the possibility that we could
have __NR_restart_syscall.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ccb705af
...@@ -64,7 +64,7 @@ static void handle_trap(int pid, union uml_pt_regs *regs, int local_using_sysemu ...@@ -64,7 +64,7 @@ static void handle_trap(int pid, union uml_pt_regs *regs, int local_using_sysemu
syscall_nr = PT_SYSCALL_NR(regs->skas.regs); syscall_nr = PT_SYSCALL_NR(regs->skas.regs);
UPT_SYSCALL_NR(regs) = syscall_nr; UPT_SYSCALL_NR(regs) = syscall_nr;
if(syscall_nr < 1){ if(syscall_nr < 0){
relay_signal(SIGTRAP, regs); relay_signal(SIGTRAP, regs);
return; return;
} }
......
...@@ -63,7 +63,8 @@ int do_syscall(void *task, int pid, int local_using_sysemu) ...@@ -63,7 +63,8 @@ int do_syscall(void *task, int pid, int local_using_sysemu)
regs = TASK_REGS(task); regs = TASK_REGS(task);
UPT_SYSCALL_NR(regs) = syscall; UPT_SYSCALL_NR(regs) = syscall;
if(syscall < 1) return(0); if(syscall < 0)
return(0);
if((syscall != __NR_sigreturn) && if((syscall != __NR_sigreturn) &&
((unsigned long *) PT_IP(proc_regs) >= &_stext) && ((unsigned long *) PT_IP(proc_regs) >= &_stext) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment