]> git.baikalelectronics.ru Git - kernel.git/commit
riscv/signal: Fixup additional syscall restarting
authorGuo Ren <ren_guo@c-sky.com>
Tue, 2 Apr 2019 08:02:33 +0000 (16:02 +0800)
committerPalmer Dabbelt <palmer@sifive.com>
Thu, 25 Apr 2019 18:07:36 +0000 (11:07 -0700)
commit9f8698d1a5423d6d83eb62a102a1c11d793bbb06
tree64466273a0db2e7553ff94b30d47f1545ac24bb9
parentf347d045419c9ec1359a3340239d37343051e450
riscv/signal: Fixup additional syscall restarting

The function of do_notify_resume called by entry.S could be entered
in loop when SIGPENDING was setted again before sret. So we must add
prevent code to make syscall restart (regs->sepc -= 0x4) or it may
re-execute unexpected instructions.

Just like in_syscall & forget_syscall used by arm.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/kernel/signal.c