]> git.itanic.dy.fi Git - linux-stable/commit
riscv: Fix spurious errors from __get/put_kernel_nofault
authorSamuel Holland <samuel.holland@sifive.com>
Tue, 12 Mar 2024 02:19:13 +0000 (19:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:38:20 +0000 (16:38 +0200)
commit67be4c6b6053f205c09b5e0a6fcf3863cb33681a
tree82d2a3d601016022b937391281d9f9fed72e7a12
parent898cc9b56a52a21de9da4c5dc6c8cfbc229cf4a6
riscv: Fix spurious errors from __get/put_kernel_nofault

commit d080a08b06b6266cc3e0e86c5acfd80db937cb6b upstream.

These macros did not initialize __kr_err, so they could fail even if
the access did not fault.

Cc: stable@vger.kernel.org
Fixes: d464118cdc41 ("riscv: implement __get_kernel_nofault and __put_user_nofault")
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20240312022030.320789-1-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/include/asm/uaccess.h