summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/ptrace.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-07-19 17:46:44 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-07-28 11:11:51 +0100
commitad82cc08f70486b5741560b1b2121dadf82897de (patch)
tree4e95106f82bf8d7db53fbbec1c04b81c36b1243e /arch/arm/kernel/ptrace.c
parentad722541147e6e517a2077e3d944105e7bc4fa8e (diff)
downloadblackbird-obmc-linux-ad82cc08f70486b5741560b1b2121dadf82897de.tar.gz
blackbird-obmc-linux-ad82cc08f70486b5741560b1b2121dadf82897de.zip
ARM: 7470/1: Revert "7443/1: Revert "new way of handling ERESTART_RESTARTBLOCK""
This reverts commit 433e2f307beff8adba241646ce9108544e0c5a03. Conflicts: arch/arm/kernel/ptrace.c Reintroduce the new syscall restart handling in preparation for further patches from Al Viro. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/ptrace.c')
-rw-r--r--arch/arm/kernel/ptrace.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index dab711e6e1ca..efd25d65ae13 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -25,6 +25,7 @@
#include <linux/regset.h>
#include <linux/audit.h>
#include <linux/tracehook.h>
+#include <linux/unistd.h>
#include <asm/pgtable.h>
#include <asm/traps.h>
@@ -940,7 +941,12 @@ static int ptrace_syscall_trace(struct pt_regs *regs, int scno,
asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
{
- int ret = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_ENTER);
+ int ret;
+
+ if (test_and_clear_thread_flag(TIF_SYSCALL_RESTARTSYS))
+ scno = __NR_restart_syscall - __NR_SYSCALL_BASE;
+
+ ret = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_ENTER);
audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1,
regs->ARM_r2, regs->ARM_r3);
return ret;
OpenPOWER on IntegriCloud