[PATCH] uml: error handling fixes
Blairsorblade noticed some confusion between our use of a system call's return value and errno. This patch fixes a number of related bugs - using errno instead of a return value using a return value instead of errno forgetting to negate a error return to get a positive error code Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
347b3dc2fa
commit
2ace87b950
@@ -104,7 +104,7 @@ void init_registers(int pid)
|
||||
err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs);
|
||||
if(err)
|
||||
panic("check_ptrace : PTRACE_GETREGS failed, errno = %d",
|
||||
err);
|
||||
errno);
|
||||
|
||||
errno = 0;
|
||||
err = ptrace(PTRACE_GETFPXREGS, pid, 0, exec_fpx_regs);
|
||||
@@ -119,7 +119,7 @@ void init_registers(int pid)
|
||||
err = ptrace(PTRACE_GETFPREGS, pid, 0, exec_fp_regs);
|
||||
if(err)
|
||||
panic("check_ptrace : PTRACE_GETFPREGS failed, errno = %d",
|
||||
err);
|
||||
errno);
|
||||
}
|
||||
|
||||
void get_safe_registers(unsigned long *regs, unsigned long *fp_regs)
|
||||
|
Reference in New Issue
Block a user