RISC-V: Fix PTRACE_SETREGSET bug.
authorJim Wilson <jimw@sifive.com>
Mon, 11 Jun 2018 21:48:22 +0000 (14:48 -0700)
committerPalmer Dabbelt <palmer@sifive.com>
Wed, 4 Jul 2018 21:12:47 +0000 (14:12 -0700)
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>
arch/riscv/kernel/ptrace.c

index ba3e807..9f82a7e 100644 (file)
@@ -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;
 }