s390/seccomp: fix error return for filtered system calls
authorJan Willeke <willeke@de.ibm.com>
Tue, 22 Jul 2014 14:50:57 +0000 (16:50 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 28 Jul 2014 08:02:31 +0000 (10:02 +0200)
The syscall_set_return_value function of s390 negates the error argument
before storing the value to the return register gpr2. This is incorrect,
the seccomp code already passes the negative error value.
Store the unmodified error value to gpr2.

Signed-off-by: Jan Willeke <willeke@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/syscall.h

index abad78d5b10c7ec24cea4133c83ab119897ce6bc..5bc12598ae9ee6d5a38766b3e6eaf199b53be65f 100644 (file)
@@ -54,7 +54,7 @@ static inline void syscall_set_return_value(struct task_struct *task,
                                            struct pt_regs *regs,
                                            int error, long val)
 {
-       regs->gprs[2] = error ? -error : val;
+       regs->gprs[2] = error ? error : val;
 }
 
 static inline void syscall_get_arguments(struct task_struct *task,
This page took 0.025908 seconds and 5 git commands to generate.