Commit 1db9b809 authored by Jim Wilson's avatar Jim Wilson Committed by Palmer Dabbelt

RISC-V: Fix PTRACE_SETREGSET bug.

In riscv_gpr_set, pass regs instead of &regs to user_regset_copyin to fix
gdb segfault.
Signed-off-by: default avatarJim Wilson <jimw@sifive.com>
Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent 86065448
...@@ -50,7 +50,7 @@ static int riscv_gpr_set(struct task_struct *target, ...@@ -50,7 +50,7 @@ static int riscv_gpr_set(struct task_struct *target,
struct pt_regs *regs; struct pt_regs *regs;
regs = task_pt_regs(target); regs = task_pt_regs(target);
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &regs, 0, -1); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment