riscv: no __user for probe_kernel_address()
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Fri, 1 Jun 2018 15:21:22 +0000 (17:21 +0200)
committerPalmer Dabbelt <palmer@sifive.com>
Thu, 7 Jun 2018 15:01:52 +0000 (08:01 -0700)
In is_valid_bugaddr(), probe_kernel_address() is called with
the PC casted to (bug_inst_t __user *) but this function
only take a plain void* as argument, not a __user pointer.

Fix this by removing the unnneded __user in the cast.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/kernel/traps.c

index 93132cb59184816f565e057c95b8837bf995088c..4c92e5af86d3f0f5674ebca30fc24219f6438026 100644 (file)
@@ -160,7 +160,7 @@ int is_valid_bugaddr(unsigned long pc)
 
        if (pc < PAGE_OFFSET)
                return 0;
-       if (probe_kernel_address((bug_insn_t __user *)pc, insn))
+       if (probe_kernel_address((bug_insn_t *)pc, insn))
                return 0;
        return (insn == __BUG_INSN);
 }