patch-2.4.8 linux/arch/s390x/kernel/signal.c
Next file: linux/arch/s390x/kernel/smp.c
Previous file: linux/arch/s390x/kernel/setup.c
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Wed Jul 25 14:12:01 2001
- Orig file:
v2.4.7/linux/arch/s390x/kernel/signal.c
- Orig date:
Wed Apr 11 19:02:29 2001
diff -u --recursive --new-file v2.4.7/linux/arch/s390x/kernel/signal.c linux/arch/s390x/kernel/signal.c
@@ -333,6 +333,7 @@
/* Set up registers for signal handler */
regs->gprs[15] = (addr_t)frame;
regs->psw.addr = FIX_PSW(ka->sa.sa_handler);
+ regs->psw.mask = _USER_PSW_MASK;
}
/* Set up to return from userspace. If provided, use a stub
already in userspace. */
@@ -359,6 +360,11 @@
#endif
/* Martin wants this for pthreads */
regs->gprs[3] = (addr_t)&frame->sc;
+
+ /* We forgot to include these in the sigcontext.
+ To avoid breaking binary compatibility, they are passed as args. */
+ regs->gprs[4] = current->thread.trap_no;
+ regs->gprs[5] = current->thread.prot_addr;
return;
give_sigsegv:
@@ -415,7 +421,7 @@
siginfo_t *info, sigset_t *oldset, struct pt_regs * regs)
{
/* Are we from a system call? */
- if (regs->orig_gpr2 >= 0) {
+ if (regs->trap == __LC_SVC_OLD_PSW) {
/* If so, check system call restarting.. */
switch (regs->gprs[2]) {
case -ERESTARTNOHAND:
@@ -568,7 +574,6 @@
/* FALLTHRU */
default:
- lock_kernel();
sigaddset(¤t->pending.signal, signr);
recalc_sigpending(current);
current->flags |= PF_SIGNALED;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)