Marcin Nowakowski 1ea4789615 MIPS: ptrace: Fix regs_return_value for kernel context
commit 74f1077b5b783e7bf4fa3007cefdc8dbd6c07518 upstream.

Currently regs_return_value always negates reg[2] if it determines
the syscall has failed, but when called in kernel context this check is
invalid and may result in returning a wrong value.

This fixes errors reported by CONFIG_KPROBES_SANITY_TEST

Fixes: d7e7528bcd45 ("Audit: push audit success and retcode into arch ptrace.h")
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14381/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-28 03:01:30 -04:00
..
2016-09-24 10:07:45 +02:00
2016-09-30 10:18:37 +02:00
2016-09-24 10:07:44 +02:00
2015-11-12 15:26:39 -08:00
2016-09-24 10:07:43 +02:00
2015-11-22 11:35:26 +01:00
2016-09-24 10:07:44 +02:00
2016-09-24 10:07:45 +02:00
2016-09-07 08:32:38 +02:00
2015-11-11 09:16:10 -08:00