riscv: no __user for probe_kernel_address()

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>
This commit is contained in:
Luc Van Oostenryck 2018-06-01 17:21:22 +02:00 committed by Palmer Dabbelt
parent 2861ae302f
commit 9bf97390b3
No known key found for this signature in database
GPG Key ID: EF4CA1502CCBAB41
1 changed files with 1 additions and 1 deletions

View 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);
}