mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
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 <jimw@sifive.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
parent
8606544890
commit
1db9b80980
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue