瀏覽代碼

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 <willeke@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Jan Willeke 11 年之前
父節點
當前提交
dc295880c6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/s390/include/asm/syscall.h

+ 1 - 1
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,
 					    struct pt_regs *regs,
 					    int error, long val)
 					    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,
 static inline void syscall_get_arguments(struct task_struct *task,