From: Jim Wilson Date: Mon, 11 Jun 2018 21:48:22 +0000 (-0700) Subject: RISC-V: Fix PTRACE_SETREGSET bug. X-Git-Tag: v4.19~667^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1db9b80980d26fe95c942e0bb8bde2ca715029ad;p=platform%2Fkernel%2Flinux-rpi.git RISC-V: Fix PTRACE_SETREGSET bug. In riscv_gpr_set, pass regs instead of ®s to user_regset_copyin to fix gdb segfault. Signed-off-by: Jim Wilson Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c index ba3e807..9f82a7e 100644 --- a/arch/riscv/kernel/ptrace.c +++ b/arch/riscv/kernel/ptrace.c @@ -50,7 +50,7 @@ static int riscv_gpr_set(struct task_struct *target, 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; }