diff options
author | Arnd Bergmann <arnd@arndb.de> | 2022-02-14 20:22:10 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2022-02-25 09:36:05 +0100 |
commit | 23fc539e81295b14b50c6ccc5baeb4f3d59d822d (patch) | |
tree | c4efbc0e265a797a6284fa49a66c19b16b6c5005 /arch/riscv/kernel/perf_callchain.c | |
parent | arm64: simplify access_ok() (diff) | |
download | linux-23fc539e81295b14b50c6ccc5baeb4f3d59d822d.tar.xz linux-23fc539e81295b14b50c6ccc5baeb4f3d59d822d.zip |
uaccess: fix type mismatch warnings from access_ok()
On some architectures, access_ok() does not do any argument type
checking, so replacing the definition with a generic one causes
a few warnings for harmless issues that were never caught before.
Fix the ones that I found either through my own test builds or
that were reported by the 0-day bot.
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/riscv/kernel/perf_callchain.c')
-rw-r--r-- | arch/riscv/kernel/perf_callchain.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv/kernel/perf_callchain.c b/arch/riscv/kernel/perf_callchain.c index 1fc075b8f764..55faa4991b87 100644 --- a/arch/riscv/kernel/perf_callchain.c +++ b/arch/riscv/kernel/perf_callchain.c @@ -15,8 +15,8 @@ static unsigned long user_backtrace(struct perf_callchain_entry_ctx *entry, { struct stackframe buftail; unsigned long ra = 0; - unsigned long *user_frame_tail = - (unsigned long *)(fp - sizeof(struct stackframe)); + unsigned long __user *user_frame_tail = + (unsigned long __user *)(fp - sizeof(struct stackframe)); /* Check accessibility of one struct frame_tail beyond */ if (!access_ok(user_frame_tail, sizeof(buftail))) |