From: Jan Willeke Date: Tue, 22 Jul 2014 14:50:57 +0000 (+0200) Subject: s390/seccomp: fix error return for filtered system calls X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=dc295880c6752076f8b94ba3885d0bfff09e3e82;p=deliverable%2Flinux.git s390/seccomp: fix error return for filtered system calls 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 Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h index abad78d5b10c..5bc12598ae9e 100644 --- a/arch/s390/include/asm/syscall.h +++ b/arch/s390/include/asm/syscall.h @@ -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,