[PATCH 09/17] uml: fix critical typo for TT mode

From: Paolo 'Blaisorblade' Giarrusso
Date: Fri Apr 07 2006 - 10:37:49 EST


From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx>

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.).

Jeff, have I misunderstood anything?

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx>
---

arch/um/sys-i386/signal.c | 2 +-
arch/um/sys-x86_64/signal.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
index f5d0e1c..618fd85 100644
--- a/arch/um/sys-i386/signal.c
+++ b/arch/um/sys-i386/signal.c
@@ -147,7 +147,7 @@ int copy_sc_to_user_tt(struct sigcontext
* 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));
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c
index e75c4e1..a4c46a8 100644
--- a/arch/um/sys-x86_64/signal.c
+++ b/arch/um/sys-x86_64/signal.c
@@ -137,7 +137,7 @@ int copy_sc_to_user_tt(struct sigcontext
* 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));
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/