diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 05:39:55 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 05:39:55 -0400 |
commit | c324b44c34050cf2a9b58830e11c974806bd85d8 (patch) | |
tree | 3ac45a783221283925cd698334a8f5e7dd4c1df8 /arch/um/sys-x86_64/signal.c | |
parent | 2fcf522509cceea524b6e7ece8fd6759b682175a (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) | |
download | blackbird-op-linux-c324b44c34050cf2a9b58830e11c974806bd85d8.tar.gz blackbird-op-linux-c324b44c34050cf2a9b58830e11c974806bd85d8.zip |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'arch/um/sys-x86_64/signal.c')
-rw-r--r-- | arch/um/sys-x86_64/signal.c | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index 8fdaed06c10d..fe1d065332b1 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c @@ -104,28 +104,35 @@ int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp, int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from, int fpsize) { - struct _fpstate *to_fp, *from_fp; - unsigned long sigs; - int err; - - to_fp = to->fpstate; - from_fp = from->fpstate; - sigs = to->oldmask; - err = copy_from_user(to, from, sizeof(*to)); - to->oldmask = sigs; - return(err); + struct _fpstate *to_fp, *from_fp; + unsigned long sigs; + int err; + + to_fp = to->fpstate; + sigs = to->oldmask; + err = copy_from_user(to, from, sizeof(*to)); + from_fp = to->fpstate; + to->fpstate = to_fp; + to->oldmask = sigs; + if(to_fp != NULL) + err |= copy_from_user(to_fp, from_fp, fpsize); + return(err); } int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp, struct sigcontext *from, int fpsize) { - struct _fpstate *to_fp, *from_fp; - int err; - - to_fp = (fp ? fp : (struct _fpstate *) (to + 1)); - from_fp = from->fpstate; - err = copy_to_user(to, from, sizeof(*to)); - return(err); + struct _fpstate *to_fp, *from_fp; + int err; + + to_fp = (fp ? fp : (struct _fpstate *) (to + 1)); + from_fp = from->fpstate; + err = copy_to_user(to, from, sizeof(*to)); + if(from_fp != NULL){ + err |= copy_to_user(&to->fpstate, &to_fp, sizeof(to->fpstate)); + err |= copy_to_user(to_fp, from_fp, fpsize); + } + return(err); } #endif |