| From | Greg Kroah-Hartman <> | Subject | [PATCH 4.17 186/324] RISC-V: Fix PTRACE_SETREGSET bug. | Date | Thu, 23 Aug 2018 09:54:12 +0200 |
| |
4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jim Wilson <jimw@sifive.com>
[ Upstream commit 1db9b80980d26fe95c942e0bb8bde2ca715029ad ]
In riscv_gpr_set, pass regs instead of ®s to user_regset_copyin to fix gdb segfault.
Signed-off-by: Jim Wilson <jimw@sifive.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- arch/riscv/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/riscv/kernel/ptrace.c +++ b/arch/riscv/kernel/ptrace.c @@ -50,7 +50,7 @@ static int riscv_gpr_set(struct task_str struct pt_regs *regs; regs = task_pt_regs(target); - ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, 0, -1); + ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1); return ret; }
|