[PATCH 2.6.11-rc2-mm1] mips: fixedrestore_sigcontext/restore_sigcontext32

From: Yoichi Yuasa
Date: Tue Jan 25 2005 - 11:34:24 EST


This patch had fixed restore_sigcontext/restore_sigcontext32 about MIPS.
This patch is only for 2.6.11-rc2-mm1.

Yoichi

Signed-off-by: Yoichi Yuasa <yuasa@xxxxxxxxxxxxxx>

diff -urN -X dontdiff a-orig/arch/mips/kernel/signal.c a/arch/mips/kernel/signal.c
--- a-orig/arch/mips/kernel/signal.c Tue Jan 25 09:23:41 2005
+++ a/arch/mips/kernel/signal.c Wed Jan 26 00:05:53 2005
@@ -154,6 +154,7 @@
asmlinkage int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
{
int err = 0;
+ unsigned int used_math;

/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
@@ -178,7 +179,8 @@
restore_gp_reg(31);
#undef restore_gp_reg

- err |= __get_user(!!used_math(), &sc->sc_used_math);
+ err |= __get_user(used_math, &sc->sc_used_math);
+ conditional_used_math(used_math);

preempt_disable();

diff -urN -X dontdiff a-orig/arch/mips/kernel/signal32.c a/arch/mips/kernel/signal32.c
--- a-orig/arch/mips/kernel/signal32.c Tue Jan 25 09:23:41 2005
+++ a/arch/mips/kernel/signal32.c Wed Jan 26 00:17:33 2005
@@ -337,6 +337,7 @@
struct sigcontext32 *sc)
{
int err = 0;
+ __u32 used_math;

/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
@@ -361,7 +362,8 @@
restore_gp_reg(31);
#undef restore_gp_reg

- err |= __get_user(!!used_math(), &sc->sc_used_math);
+ err |= __get_user(used_math, &sc->sc_used_math);
+ conditional_used_math(used_math);

preempt_disable();


-
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/