linux-mips
[Top] [All Lists]

Re: what is the right behavior of copy_to_user(0x0, ..., ...)?

To: Carsten Langgaard <carstenl@mips.com>
Subject: Re: what is the right behavior of copy_to_user(0x0, ..., ...)?
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Tue, 7 May 2002 03:44:38 +0800
Cc: Jun Sun <jsun@mvista.com>, linux-mips <linux-mips@oss.sgi.com>
In-reply-to: <3CD794BC.43264E9E@mips.com>; from carstenl@mips.com on Tue, May 07, 2002 at 10:47:56AM +0200
References: <3CD3052B.1050400@mvista.com> <20020503162337.A27366@dea.linux-mips.net> <3CD32044.9040109@mvista.com> <20020503184000.A1238@dea.linux-mips.net> <3CD794BC.43264E9E@mips.com>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
On Tue, May 07, 2002 at 10:47:56AM +0200, Carsten Langgaard wrote:

> I have fixed it locally by removing the SW from the delay-slot, but obviously
> your fix is the right one.
> But I guess we need the same fix in arch/mips/kernel/unaligned.c.

Smoke this:

Index: arch/mips64/kernel/unaligned.c
===================================================================
RCS file: /home/pub/cvs/linux/arch/mips64/kernel/unaligned.c,v
retrieving revision 1.6.2.3
diff -u -r1.6.2.3 unaligned.c
--- arch/mips64/kernel/unaligned.c      24 Apr 2002 07:58:54 -0000      1.6.2.3
+++ arch/mips64/kernel/unaligned.c      7 May 2002 10:29:05 -0000
@@ -351,7 +351,7 @@
 
 fault:
        /* Did we have an exception handler installed? */
-       fixup = search_exception_table(regs->cp0_epc);
+       fixup = search_exception_table(exception_epc(regs));
        if (fixup) {
                long new_epc;
                new_epc = fixup_exception(dpf_reg, fixup, regs->cp0_epc);
Index: arch/mips/kernel/unaligned.c
===================================================================
RCS file: /home/pub/cvs/linux/arch/mips/kernel/unaligned.c,v
retrieving revision 1.15.2.4
diff -u -r1.15.2.4 unaligned.c
--- arch/mips/kernel/unaligned.c        24 Apr 2002 07:50:26 -0000      1.15.2.4
+++ arch/mips/kernel/unaligned.c        7 May 2002 10:29:05 -0000
@@ -332,7 +332,7 @@
 
 fault:
        /* Did we have an exception handler installed? */
-       fixup = search_exception_table(regs->cp0_epc);
+       fixup = search_exception_table(exception_epc(regs));
        if (fixup) {
                long new_epc;
                new_epc = fixup_exception(dpf_reg, fixup, regs->cp0_epc);

  Ralf

<Prev in Thread] Current Thread [Next in Thread>