powerpc: fix double syscall restarts
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 20 Sep 2010 20:48:57 +0000 (21:48 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 22 Sep 2010 16:33:50 +0000 (09:33 -0700)
commit9a81c16b527528ad307843be5571111aa8d35a80
tree4fea21edefa32d8e8e997f3db63f9cefaddff28c
parentb68e9d4581cbb211be3e174d3445b4917aacbcf6
powerpc: fix double syscall restarts

Make sigreturn zero regs->trap, make do_signal() do the same on all
paths.  As it is, signal interrupting e.g. read() from fd 512 (==
ERESTARTSYS) with another signal getting unblocked when the first
handler finishes will lead to restart one insn earlier than it ought
to.  Same for multiple signals with in-kernel handlers interrupting
that sucker at the same time.  Same for multiple signals of any kind
interrupting that sucker on 64bit...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/powerpc/kernel/signal.c
arch/powerpc/kernel/signal_32.c
arch/powerpc/kernel/signal_64.c