From: Andree Leidenfrost Date: Sun, 1 May 2005 15:58:53 +0000 (-0700) Subject: [PATCH] uml: fix handling of no fpx_regs X-Git-Tag: v2.6.12-rc4~136^2~124 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aec3072833283a5e2ecf07318bd383a67321657;p=linux-2.6 [PATCH] uml: fix handling of no fpx_regs Paolo 'Blaisorblade' Giarrusso Fix the error path, which is triggered when the processor misses the fpx regs (i.e. the "fxsr" cpuinfo feature). For instance by VIA C3 Samuel2. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c index 148645b144..9a0ad094d9 100644 --- a/arch/um/os-Linux/sys-i386/registers.c +++ b/arch/um/os-Linux/sys-i386/registers.c @@ -105,14 +105,15 @@ void init_registers(int pid) panic("check_ptrace : PTRACE_GETREGS failed, errno = %d", err); + errno = 0; err = ptrace(PTRACE_GETFPXREGS, pid, 0, exec_fpx_regs); if(!err) return; + if(errno != EIO) + panic("check_ptrace : PTRACE_GETFPXREGS failed, errno = %d", + errno); have_fpx_regs = 0; - if(err != EIO) - panic("check_ptrace : PTRACE_GETFPXREGS failed, errno = %d", - err); err = ptrace(PTRACE_GETFPREGS, pid, 0, exec_fp_regs); if(err)