Skip to content

Commit 86ca57b

Browse files
larperaxisralfbaechle
authored andcommitted
MIPS: Fix syscall tracing interface
Fix pointer computation for stack-based arguments. Signed-off-by: Lars Persson <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/6620/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent a8031d2 commit 86ca57b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/mips/include/asm/syscall.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
4040

4141
#ifdef CONFIG_32BIT
4242
case 4: case 5: case 6: case 7:
43-
return get_user(*arg, (int *)usp + 4 * n);
43+
return get_user(*arg, (int *)usp + n);
4444
#endif
4545

4646
#ifdef CONFIG_64BIT
4747
case 4: case 5: case 6: case 7:
4848
#ifdef CONFIG_MIPS32_O32
4949
if (test_thread_flag(TIF_32BIT_REGS))
50-
return get_user(*arg, (int *)usp + 4 * n);
50+
return get_user(*arg, (int *)usp + n);
5151
else
5252
#endif
5353
*arg = regs->regs[4 + n];

0 commit comments

Comments
 (0)