mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 23:52:40 +00:00
mips: fix syscall_get_nr
commit85cc91e2ba
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 commit201766a20e
("ptrace: add PTRACE_GET_SYSCALL_INFO request") and detected by strace test suite. Link: https://github.com/strace/strace/issues/235 Fixes:c2d9f17757
("MIPS: Fix syscall_get_nr for the syscall exit tracing.") Cc: <stable@vger.kernel.org> # v3.19+ Co-developed-by: Dmitry V. Levin <ldv@strace.io> Signed-off-by: Dmitry V. Levin <ldv@strace.io> Signed-off-by: Elvira Khabirova <lineprinter0@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c408531286
commit
963a024ffe
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ static inline bool mips_syscall_is_indirect(struct task_struct *task,
|
|||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue