aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/um/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/um/signal.c')
-rw-r--r--arch/x86/um/signal.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c
index 14fcd01ed992..dac23ee4e5a1 100644
--- a/arch/x86/um/signal.c
+++ b/arch/x86/um/signal.c
@@ -225,20 +225,10 @@ static int copy_sc_from_user(struct pt_regs *regs,
225 } else 225 } else
226#endif 226#endif
227 { 227 {
228 struct user_i387_struct fp; 228 err = copy_from_user(regs->regs.fp, (void *)sc.fpstate,
229
230 err = copy_from_user(&fp, (void *)sc.fpstate,
231 sizeof(struct user_i387_struct)); 229 sizeof(struct user_i387_struct));
232 if (err) 230 if (err)
233 return 1; 231 return 1;
234
235 err = restore_fp_registers(pid, (unsigned long *) &fp);
236 if (err < 0) {
237 printk(KERN_ERR "copy_sc_from_user - "
238 "restore_fp_registers failed, errno = %d\n",
239 -err);
240 return 1;
241 }
242 } 232 }
243 return 0; 233 return 0;
244} 234}
@@ -325,10 +315,8 @@ static int copy_sc_to_user(struct sigcontext __user *to,
325 } else 315 } else
326#endif 316#endif
327 { 317 {
328 struct user_i387_struct fp; 318 if (copy_to_user(to_fp, regs->regs.fp,
329 319 sizeof(struct user_i387_struct)))
330 err = save_fp_registers(pid, (unsigned long *) &fp);
331 if (copy_to_user(to_fp, &fp, sizeof(struct user_i387_struct)))
332 return 1; 320 return 1;
333 } 321 }
334 322