This is a note to let you know that I've just added the patch titled mips: fix syscall_get_nr to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mips-fix-syscall_get_nr.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 85cc91e2ba4262a602ec65e2b76c4391a9e60d3d Mon Sep 17 00:00:00 2001 From: Elvira Khabirova <lineprinter0@xxxxxxxxx> Date: Sat, 18 Feb 2023 23:43:59 +0100 Subject: mips: fix syscall_get_nr From: Elvira Khabirova <lineprinter0@xxxxxxxxx> commit 85cc91e2ba4262a602ec65e2b76c4391a9e60d3d upstream. The implementation of syscall_get_nr on mips used to ignore the task argument and return the syscall number of the calling thread instead of the target thread. The bug was exposed to user space by commit 201766a20e30f ("ptrace: add PTRACE_GET_SYSCALL_INFO request") and detected by strace test suite. Link: https://github.com/strace/strace/issues/235 Fixes: c2d9f1775731 ("MIPS: Fix syscall_get_nr for the syscall exit tracing.") Cc: <stable@xxxxxxxxxxxxxxx> # v3.19+ Co-developed-by: Dmitry V. Levin <ldv@xxxxxxxxx> Signed-off-by: Dmitry V. Levin <ldv@xxxxxxxxx> Signed-off-by: Elvira Khabirova <lineprinter0@xxxxxxxxx> Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/mips/include/asm/syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/mips/include/asm/syscall.h +++ b/arch/mips/include/asm/syscall.h @@ -38,7 +38,7 @@ static inline bool mips_syscall_is_indir static inline long syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { - return current_thread_info()->syscall; + return task_thread_info(task)->syscall; } static inline void mips_syscall_update_nr(struct task_struct *task, Patches currently in stable-queue which might be from lineprinter0@xxxxxxxxx are queue-5.10/mips-fix-syscall_get_nr.patch