Skip to content

Commit 1db9b80

Browse files
Jim Wilsonpalmer-dabbelt
authored andcommitted
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: Jim Wilson <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 8606544 commit 1db9b80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/kernel/ptrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static int riscv_gpr_set(struct task_struct *target,
5050
struct pt_regs *regs;
5151

5252
regs = task_pt_regs(target);
53-
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &regs, 0, -1);
53+
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
5454
return ret;
5555
}
5656

0 commit comments

Comments
 (0)