MIPS: ptrace: Test correct task's flags in task_user_regset_view()
authorAlex Smith <alex@alex-smith.me.uk>
Wed, 23 Jul 2014 13:40:07 +0000 (14:40 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 30 Jul 2014 21:27:34 +0000 (23:27 +0200)
task_user_regset_view() should test for TIF_32BIT_REGS in the flags of
the specified task, not of the current task.

Signed-off-by: Alex Smith <alex@alex-smith.me.uk>
Cc: <stable@vger.kernel.org> # v3.13+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7450/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/ptrace.c

index 6063b112a6aa17de9cf3250b85b6b9af6518a39c..8f2130a2bbd33e2f48e34cd7a0ec43427df4a136 100644 (file)
@@ -398,7 +398,7 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
 #endif
 
 #ifdef CONFIG_MIPS32_O32
-               if (test_thread_flag(TIF_32BIT_REGS))
+               if (test_tsk_thread_flag(task, TIF_32BIT_REGS))
                        return &user_mips_view;
 #endif