summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Willeke <willeke@de.ibm.com>2014-07-22 16:50:57 +0200
committerWilly Tarreau <w@1wt.eu>2016-08-27 11:40:30 +0200
commit884c6beca31ef639a7002f461efbe036c22006de (patch)
tree1046bb57503c901d7214f27a721d43b54552b67d
parent12f63d9dba9e36a1a0176df42e53ae6167cdae09 (diff)
downloadlwn-884c6beca31ef639a7002f461efbe036c22006de.tar.gz
lwn-884c6beca31ef639a7002f461efbe036c22006de.zip
s390/seccomp: fix error return for filtered system calls
commit dc295880c6752076f8b94ba3885d0bfff09e3e82 upstream. 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> Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r--arch/s390/include/asm/syscall.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h
index cd29d2f4e4f3..749313b452ae 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,