MIPS: Fix syscall tracing interface
authorLars Persson <lars.persson@axis.com>
Mon, 17 Mar 2014 11:14:13 +0000 (12:14 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 17 Mar 2014 14:38:38 +0000 (15:38 +0100)
Fix pointer computation for stack-based arguments.

Signed-off-by: Lars Persson <larper@axis.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6620/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/syscall.h

index a7e8a532f144096edae07d79f72e5182e00d1592..f35b131977e62a3ef0d81c47da6827f47d527b71 100644 (file)
@@ -40,14 +40,14 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
 
 #ifdef CONFIG_32BIT
        case 4: case 5: case 6: case 7:
-               return get_user(*arg, (int *)usp + 4 * n);
+               return get_user(*arg, (int *)usp + n);
 #endif
 
 #ifdef CONFIG_64BIT
        case 4: case 5: case 6: case 7:
 #ifdef CONFIG_MIPS32_O32
                if (test_thread_flag(TIF_32BIT_REGS))
-                       return get_user(*arg, (int *)usp + 4 * n);
+                       return get_user(*arg, (int *)usp + n);
                else
 #endif
                        *arg = regs->regs[4 + n];