]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7443/1: Revert "new way of handling ERESTART_RESTARTBLOCK"
authorWill Deacon <will.deacon@arm.com>
Wed, 4 Jul 2012 17:17:16 +0000 (18:17 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jul 2012 08:50:56 +0000 (09:50 +0100)
commit7328c38bab1e66a562e1ca5668451c3a6d6ac8ca
tree8f816b84bae19872ade5db31fe3d6f223dc52675
parente8e0d11432d3fb14e84ec8eb39e61de693a46df7
ARM: 7443/1: Revert "new way of handling ERESTART_RESTARTBLOCK"

This reverts commit b716887091a038e3a8ba4f03c7441d601034f3ca.

Conflicts:

arch/arm/kernel/ptrace.c

The new syscall restarting code can lead to problems if we take an
interrupt in userspace just before restarting the svc instruction. If
a signal is delivered when returning from the interrupt, the
TIF_SYSCALL_RESTARTSYS will remain set and cause any syscalls executed
from the signal handler to be treated as a restart of the previously
interrupted system call. This includes the final sigreturn call, meaning
that we may fail to exit from the signal context. Furthermore, if a
system call made from the signal handler requires a restart via the
restart_block, it is possible to clear the thread flag and fail to
restart the originally interrupted system call.

The right solution to this problem is to perform the restarting in the
kernel, avoiding the possibility of handling a further signal before the
restart is complete. Since we're almost at -rc6, let's revert the new
method for now and aim for in-kernel restarting at a later date.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/thread_info.h
arch/arm/kernel/ptrace.c
arch/arm/kernel/signal.c