Commit 884c6bec authored by Jan Willeke's avatar Jan Willeke Committed by Willy Tarreau

s390/seccomp: fix error return for filtered system calls

commit dc295880 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: default avatarJan Willeke <willeke@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 12f63d9d
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment