[PATCH] uml: fix critical typo for TT mode
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Tue, 11 Apr 2006 05:53:34 +0000 (22:53 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:36 +0000 (06:18 -0700)
Noticed this for a compilation-time warning, so I'm fixing it even for TT mode
- this is not put_user, but copy_to_user, so we need a pointer to sp, not sp
itself (we're trying to write the word pointed to by the "sp" var.).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/sys-i386/signal.c
arch/um/sys-x86_64/signal.c

index f5d0e1c37ea263950d03d33a6edb50ce0966da81..618fd8594643b147ec6c878f696ab28a02ce0aeb 100644 (file)
@@ -147,7 +147,7 @@ int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate __user *fp,
         * delivery.  The sp passed in is the original, and this needs
         * to be restored, so we stick it in separately.
         */
-       err |= copy_to_user(&SC_SP(to), sp, sizeof(sp));
+       err |= copy_to_user(&SC_SP(to), &sp, sizeof(sp));
 
        if(from_fp != NULL){
                err |= copy_to_user(&to->fpstate, &to_fp, sizeof(to->fpstate));
index e75c4e1838b0dacedf88ffcd79e31ce44e9cad1d..a4c46a8af00842078fb03e2f36592f4706abf49c 100644 (file)
@@ -137,7 +137,7 @@ int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp,
         * delivery.  The sp passed in is the original, and this needs
         * to be restored, so we stick it in separately.
         */
-       err |= copy_to_user(&SC_SP(to), sp, sizeof(sp));
+       err |= copy_to_user(&SC_SP(to), &sp, sizeof(sp));
 
        if(from_fp != NULL){
                err |= copy_to_user(&to->fpstate, &to_fp, sizeof(to->fpstate));