summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-12-01 13:32:15 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2011-12-01 13:32:17 +0100
commitd9ae6772d3a3d7325d535577d9fd09c0de8a9da3 (patch)
tree120686dcbc091c5f2b5d89db4859553121d9f7b2 /arch/s390
parent5f894cbb6890d317699aa622b4dc9d73d009cd22 (diff)
downloadop-kernel-dev-d9ae6772d3a3d7325d535577d9fd09c0de8a9da3.zip
op-kernel-dev-d9ae6772d3a3d7325d535577d9fd09c0de8a9da3.tar.gz
[S390] ptrace inferior call interactions with TIF_SYSCALL
The TIF_SYSCALL bit needs to be cleared if the debugger changes the state of the ptraced process in regard to the presence of a system call. Otherwise the system call will be restarted although the debugger set up an inferior call. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/signal.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
index 05a85bc..7f6f9f3 100644
--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -460,9 +460,9 @@ void do_signal(struct pt_regs *regs)
regs->svc_code >> 16);
break;
}
- /* No longer in a system call */
- clear_thread_flag(TIF_SYSCALL);
}
+ /* No longer in a system call */
+ clear_thread_flag(TIF_SYSCALL);
if ((is_compat_task() ?
handle_signal32(signr, &ka, &info, oldset, regs) :
@@ -486,6 +486,7 @@ void do_signal(struct pt_regs *regs)
}
/* No handlers present - check for system call restart */
+ clear_thread_flag(TIF_SYSCALL);
if (current_thread_info()->system_call) {
regs->svc_code = current_thread_info()->system_call;
switch (regs->gprs[2]) {
@@ -500,9 +501,6 @@ void do_signal(struct pt_regs *regs)
regs->gprs[2] = regs->orig_gpr2;
set_thread_flag(TIF_SYSCALL);
break;
- default:
- clear_thread_flag(TIF_SYSCALL);
- break;
}
}
OpenPOWER on IntegriCloud