aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2014-01-22 09:39:57 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-03-17 10:34:28 -0400
commita8031d2ce15bdb90baeae02d7a231ccece73da8b (patch)
tree62b1b2bd0b843d5bce30ef050d71590092872a3f /arch
parent7f02c463057fc527f52066742b84d9d89b22e83d (diff)
MIPS: asm: syscall: Fix copying system call arguments
The syscall_get_arguments function expects the arguments to be copied to the '*args' argument but instead a local variable was used to hold the system call argument. As a result of which, this variable was never passed to the filter and any filter testing the system call arguments would fail. This is fixed by passing the '*args' variable as the destination memory for the system call arguments. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Reviewed-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6402/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/syscall.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
index 5ce530fcb11f..a7e8a532f144 100644
--- a/arch/mips/include/asm/syscall.h
+++ b/arch/mips/include/asm/syscall.h
@@ -86,11 +86,10 @@ static inline void syscall_get_arguments(struct task_struct *task,
86 unsigned int i, unsigned int n, 86 unsigned int i, unsigned int n,
87 unsigned long *args) 87 unsigned long *args)
88{ 88{
89 unsigned long arg;
90 int ret; 89 int ret;
91 90
92 while (n--) 91 while (n--)
93 ret |= mips_get_syscall_arg(&arg, task, regs, i++); 92 ret |= mips_get_syscall_arg(args++, task, regs, i++);
94 93
95 /* 94 /*
96 * No way to communicate an error because this is a void function. 95 * No way to communicate an error because this is a void function.