]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: ptrace: Fix regs_return_value for kernel context
authorMarcin Nowakowski <marcin.nowakowski@imgtec.com>
Wed, 12 Oct 2016 07:32:56 +0000 (09:32 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 12 Oct 2016 12:34:45 +0000 (14:34 +0200)
commit86fa4ed5fb4dd74a9a73aa99c9f3680d019e800f
tree82bb98c646ae13a434752ca2f5ebb2250192ac76
parentce0fd46945ac318b28bc38591a2e477616f7fbea
MIPS: ptrace: Fix regs_return_value for kernel context

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: df8a5648b3cc ("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
Cc: stable@vger.kernel.org # 3.3+
Patchwork: https://patchwork.linux-mips.org/patch/14381/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/ptrace.h