summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2018-11-21 22:14:39 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-08 13:03:37 +0100
commitd3c0999433352dacda6da37c237388bfa9bae1c2 (patch)
tree3a1b1f2e2250c1d09c65ed5e0ce38e6817a71691
parent9aab50aec56772ff6e1a2dead6097cf2921fe944 (diff)
downloadlinux-stable-d3c0999433352dacda6da37c237388bfa9bae1c2.tar.gz
linux-stable-d3c0999433352dacda6da37c237388bfa9bae1c2.tar.bz2
linux-stable-d3c0999433352dacda6da37c237388bfa9bae1c2.zip
mips: fix mips_get_syscall_arg o32 check
commit c50cbd85cd7027d32ac5945bb60217936b4f7eaf upstream. When checking for TIF_32BIT_REGS flag, mips_get_syscall_arg() should use the task specified as its argument instead of the current task. This potentially affects all syscall_get_arguments() users who specify tasks different from the current. Fixes: c0ff3c53d4f99 ("MIPS: Enable HAVE_ARCH_TRACEHOOK.") Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/21185/ Cc: Elvira Khabirova <lineprinter@altlinux.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v3.13+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/mips/include/asm/syscall.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
index 7c713025b23f..53ee82b1efa7 100644
--- a/arch/mips/include/asm/syscall.h
+++ b/arch/mips/include/asm/syscall.h
@@ -51,7 +51,7 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
#ifdef CONFIG_64BIT
case 4: case 5: case 6: case 7:
#ifdef CONFIG_MIPS32_O32
- if (test_thread_flag(TIF_32BIT_REGS))
+ if (test_tsk_thread_flag(task, TIF_32BIT_REGS))
return get_user(*arg, (int *)usp + n);
else
#endif