patch-pre2.0.8 linux/arch/ppc/kernel/signal.c

Next file: linux/arch/ppc/kernel/stubs.c
Previous file: linux/arch/ppc/kernel/setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.7/linux/arch/ppc/kernel/signal.c linux/arch/ppc/kernel/signal.c
@@ -56,7 +56,13 @@
 	sc++;  /* Pop signal 'context' */
 	if (sc == (struct sigcontext_struct *)(int_regs))
 	{ /* Last stacked signal */
+#if 0	
+		/* This doesn't work - it blows away the return address! */
 		memcpy(regs, int_regs, sizeof(*regs));
+#else
+		/* Don't mess up 'my' stack frame */
+		memcpy(&regs->gpr, &int_regs->gpr, sizeof(*regs)-sizeof(regs->_overhead));
+#endif		
 		if ((int)regs->orig_gpr3 >= 0 &&
 		    ((int)regs->result == -ERESTARTNOHAND ||
 		     (int)regs->result == -ERESTARTSYS ||
@@ -111,7 +117,7 @@
 			if (signr & (1<<bitno)) break;
 		}
 		signr = bitno;
-#endif		
+#endif
 		current->signal &= ~(1<<signr);  /* Clear bit */
 		sa = current->sig->action + signr;
 		signr++;
@@ -166,7 +172,6 @@
 				/* fall through */
 			default:
 				current->signal |= _S(signr & 0x7f);
-				current->flags |= PF_SIGNALED;
 				do_exit(signr);
 			}
 		}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this