[Top] [All Lists]

[PATCH 1/8] MIPS: asm: syscall: Fix copying system call arguments

To: <>
Subject: [PATCH 1/8] MIPS: asm: syscall: Fix copying system call arguments
From: Markos Chandras <>
Date: Wed, 22 Jan 2014 14:39:57 +0000
Cc: Markos Chandras <>
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <>
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.

Reviewed-by: Paul Burton <>
Reviewed-by: James Hogan <>
Signed-off-by: Markos Chandras <>
 arch/mips/include/asm/syscall.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
index 33e8dbf..10d98b9 100644
--- a/arch/mips/include/asm/syscall.h
+++ b/arch/mips/include/asm/syscall.h
@@ -83,11 +83,10 @@ static inline void syscall_get_arguments(struct task_struct 
                                         unsigned int i, unsigned int n,
                                         unsigned long *args)
-       unsigned long arg;
        int ret;
        while (n--)
-               ret |= mips_get_syscall_arg(&arg, task, regs, i++);
+               ret |= mips_get_syscall_arg(args++, task, regs, i++);
         * No way to communicate an error because this is a void function.

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