提交 03dd061f 编写于 作者: M Michael Karcher 提交者: Rich Felker

sh: bring syscall_set_return_value in line with other architectures

Other architectures expect that syscall_set_return_value gets an already
negative value as error. That's also what kernel/seccomp.c provides.
Signed-off-by: NMichael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Tested-by: NJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: NRich Felker <dalias@libc.org>
上级 0bb605c2
......@@ -40,10 +40,7 @@ static inline void syscall_set_return_value(struct task_struct *task,
struct pt_regs *regs,
int error, long val)
{
if (error)
regs->regs[0] = -error;
else
regs->regs[0] = val;
regs->regs[0] = (long) error ?: val;
}
static inline void syscall_get_arguments(struct task_struct *task,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册