]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
MIPS: Fix error values in case of bad_stack
authorAl Viro <viro@ftp.linux.org.uk>
Tue, 28 Sep 2010 17:50:47 +0000 (18:50 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 18 Oct 2010 15:59:03 +0000 (16:59 +0100)
We want EFAULT, not -<syscall number>

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1699/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/scall32-o32.S
arch/mips/kernel/scall64-o32.S

index 73a061e855316a88b5e9756cca21e452d3d2b038..84b41797fae1038253b5eddfbec8aac671a91ad7 100644 (file)
@@ -169,7 +169,7 @@ stackargs:
         * We probably should handle this case a bit more drastic.
         */
 bad_stack:
-       negu    v0                              # error
+       li      v0, EFAULT
        sw      v0, PT_R2(sp)
        li      t0, 1                           # set error flag
        sw      t0, PT_R7(sp)
index 7ce0a36856270227839285f61dfc7242f304c66c..d2bc285413dc5cc70324e5e23b9733e3956d0e72 100644 (file)
@@ -156,7 +156,7 @@ trace_a_syscall:
         * The stackpointer for a call with more than 4 arguments is bad.
         */
 bad_stack:
-       dnegu   v0                      # error
+       li      v0, EFAULT
        sd      v0, PT_R2(sp)
        li      t0, 1                   # set error flag
        sd      t0, PT_R7(sp)