diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-01 17:21:22 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmer@sifive.com> | 2018-06-07 17:01:52 +0200 |
commit | 9bf97390b3030b68a465681043a66461c7cf6a65 (patch) | |
tree | 7a7e0c68d360c4a6314e56407975fc3472273be7 /arch | |
parent | riscv: use NULL instead of a plain 0 (diff) | |
download | linux-9bf97390b3030b68a465681043a66461c7cf6a65.tar.xz linux-9bf97390b3030b68a465681043a66461c7cf6a65.zip |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/riscv/kernel/traps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 93132cb59184..4c92e5af86d3 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -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); } |