]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
riscv: uaccess: fix __put_kernel_nofault()
authorChangbin Du <changbin.du@gmail.com>
Mon, 2 Nov 2020 07:30:52 +0000 (15:30 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 6 Nov 2020 08:03:46 +0000 (00:03 -0800)
commit635e3f3e47f24b2506bc9daf91d70ddf3cd024a9
tree190bfd65139ea47af92ae32608de28c1f7b7b73a
parentbcacf5f6f239a9e60287680514f392748cb4ec39
riscv: uaccess: fix __put_kernel_nofault()

The copy_from_kernel_nofault() is broken on riscv because the 'dst' and
'src' are mistakenly reversed in __put_kernel_nofault() macro.

copy_to_kernel_nofault:
...
0xffffffe0003159b8 <+30>:    sd      a4,0(a1) # a1 aka 'src'

Fixes: d464118cdc ("riscv: implement __get_kernel_nofault and __put_user_nofault")
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
Tested-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/uaccess.h