Skip to content

Commit 6aec307

Browse files
aleidenfLinus Torvalds
authored andcommitted
[PATCH] uml: fix handling of no fpx_regs
Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> 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 <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 8e7a4f6 commit 6aec307

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎arch/um/os-Linux/sys-i386/registers.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,15 @@ void init_registers(int pid)
105105
panic("check_ptrace : PTRACE_GETREGS failed, errno = %d",
106106
err);
107107

108+
errno = 0;
108109
err = ptrace(PTRACE_GETFPXREGS, pid, 0, exec_fpx_regs);
109110
if(!err)
110111
return;
112+
if(errno != EIO)
113+
panic("check_ptrace : PTRACE_GETFPXREGS failed, errno = %d",
114+
errno);
111115

112116
have_fpx_regs = 0;
113-
if(err != EIO)
114-
panic("check_ptrace : PTRACE_GETFPXREGS failed, errno = %d",
115-
err);
116117

117118
err = ptrace(PTRACE_GETFPREGS, pid, 0, exec_fp_regs);
118119
if(err)

0 commit comments

Comments
 (0)