mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ppc: fix bogosity in process-freezing code
@ 2005-04-04  4:02 Paul Mackerras
  0 siblings, 0 replies; only message in thread
From: Paul Mackerras @ 2005-04-04  4:02 UTC (permalink / raw)
  To: akpm; +Cc: benh, trini, linux-kernel

The code that went into arch/ppc/kernel/signal.c recently to handle
process freezing seems to contain a dubious assumption: that a process
that calls do_signal when PF_FREEZE is set will have entered the
kernel because of a system call.  This patch removes that assumption.

Signed-off-by: Paul Mackerras <paulus@samba.org>

diff -urN linux-2.5/arch/ppc/kernel/signal.c pmac-2.5/arch/ppc/kernel/signal.c
--- linux-2.5/arch/ppc/kernel/signal.c	2005-03-15 10:18:23.000000000 +1100
+++ pmac-2.5/arch/ppc/kernel/signal.c	2005-04-02 15:12:21.000000000 +1000
@@ -708,7 +708,6 @@
 	if (current->flags & PF_FREEZE) {
 		refrigerator(PF_FREEZE);
 		signr = 0;
-		ret = regs->gpr[3];
 		if (!signal_pending(current))
 			goto no_signal;
 	}
@@ -719,7 +718,7 @@
 	newsp = frame = 0;
 
 	signr = get_signal_to_deliver(&info, &ka, regs, NULL);
-
+ no_signal:
 	if (TRAP(regs) == 0x0C00		/* System Call! */
 	    && regs->ccr & 0x10000000		/* error signalled */
 	    && ((ret = regs->gpr[3]) == ERESTARTSYS
@@ -735,7 +734,6 @@
 			regs->gpr[3] = EINTR;
 			/* note that the cr0.SO bit is already set */
 		} else {
-no_signal:
 			regs->nip -= 4;	/* Back up & retry system call */
 			regs->result = 0;
 			regs->trap = 0;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-04  4:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-04  4:02 [PATCH] ppc: fix bogosity in process-freezing code Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®