linux/arch/riscv
Ben Dooks b9b916aee6
riscv: uaccess: fix type of 0 variable on error in get_user()
If the get_user(x, ptr) has x as a pointer, then the setting
of (x) = 0 is going to produce the following sparse warning,
so fix this by forcing the type of 'x' when access_ok() fails.

fs/aio.c:2073:21: warning: Using plain integer as NULL pointer

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20221229170545.718264-1-ben-linux@fluff.org
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-01-05 12:30:41 -08:00
..
boot RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
configs RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
errata drivers/perf: riscv_pmu_sbi: add support for PMU variant on T-Head C9xx cores 2022-10-27 14:35:20 -07:00
include riscv: uaccess: fix type of 0 variable on error in get_user() 2023-01-05 12:30:41 -08:00
kernel riscv, kprobes: Stricter c.jr/c.jalr decoding 2023-01-05 12:30:41 -08:00
kvm RISC-V: KVM: Add ONE_REG interface for mvendorid, marchid, and mimpid 2022-12-07 09:17:49 +05:30
lib riscv: lib: uaccess: fix CSR_STATUS SR_SUM bit 2022-08-10 14:06:31 -07:00
mm RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
net riscv, bpf: Emit fixed-length instructions for BPF_PSEUDO_FUNC 2022-12-06 20:59:27 +01:00
purgatory riscv/purgatory: Omit use of bin2c 2022-08-11 09:32:34 -07:00
Kbuild riscv: move errata/ and kvm/ builds to arch/riscv/Kbuild 2022-06-01 22:26:32 -07:00
Kconfig RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
Kconfig.debug
Kconfig.erratas drivers/perf: riscv_pmu_sbi: add support for PMU variant on T-Head C9xx cores 2022-10-27 14:35:20 -07:00
Kconfig.socs RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
Makefile kbuild: add test-{ge,gt,le,lt} macros 2022-12-13 22:21:14 +09:00