android_kernel_xiaomi_sm8450/arch/riscv
Al Viro 12fda27a41 riscv: fix a nasty sigreturn bug...
commit 762df359aa5849e010ef04c3ed79d57588ce17d9 upstream.

riscv has an equivalent of arm bug fixed by 653d48b221 ("arm: fix
really nasty sigreturn bug"); if signal gets caught by an interrupt that
hits when we have the right value in a0 (-513), *and* another signal
gets delivered upon sigreturn() (e.g. included into the blocked mask for
the first signal and posted while the handler had been running), the
syscall restart logics will see regs->cause equal to EXC_SYSCALL (we are
in a syscall, after all) and a0 already restored to its original value
(-513, which happens to be -ERESTARTNOINTR) and assume that we need to
apply the usual syscall restart logics.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: e2c0cdfba7 ("RISC-V: User-facing API")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/YxJEiSq%2FCGaL6Gm9@ZenIV/
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-28 11:10:27 +02:00
..
boot riscv: dts: sifive: fu540-c000: align dma node name with dtschema 2022-05-25 09:17:59 +02:00
configs riscv: defconfig: enable gpio support for HiFive Unleashed 2021-01-27 11:55:01 +01:00
include riscv: Fix irq_work when SMP is disabled 2022-06-09 10:20:48 +02:00
kernel riscv: fix a nasty sigreturn bug... 2022-09-28 11:10:27 +02:00
lib riscv: use memcpy based uaccess for nommu again 2020-10-04 10:27:07 -07:00
mm mm: pagewalk: Fix race between unmap and page walker 2022-09-08 11:11:38 +02:00
net riscv, bpf: Fix potential NULL dereference 2021-11-02 19:48:21 +01:00
Kbuild riscv: Allow device trees to be built into the kernel 2020-05-18 11:38:05 -07:00
Kconfig riscv: Fix asan-stack clang build 2021-11-02 19:48:25 +01:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.socs RISC-V: Remove CLINT related code from timer and arch 2020-08-20 10:58:13 -07:00
Makefile riscv: add as-options for modules with assembly compontents 2022-07-29 17:19:06 +02:00