aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/ptrace.c
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2018-06-11 14:48:22 -0700
committerPalmer Dabbelt <palmer@sifive.com>2018-07-04 14:12:47 -0700
commit1db9b80980d26fe95c942e0bb8bde2ca715029ad (patch)
treee904a546ebe14ff35e6979197cda376adf0b71ff /arch/riscv/kernel/ptrace.c
parentRISC-V: Don't include irq-riscv-intc.h (diff)
downloadlinux-dev-1db9b80980d26fe95c942e0bb8bde2ca715029ad.tar.xz
linux-dev-1db9b80980d26fe95c942e0bb8bde2ca715029ad.zip
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 <jimw@sifive.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/kernel/ptrace.c')
-rw-r--r--arch/riscv/kernel/ptrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
index ba3e80712797..9f82a7e34c64 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, &regs, 0, -1);
+ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
return ret;
}