Commit 16acbc62 authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] ppc32: fix bogosity in process-freezing code

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: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0c9b7942
...@@ -708,7 +708,6 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs) ...@@ -708,7 +708,6 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
if (current->flags & PF_FREEZE) { if (current->flags & PF_FREEZE) {
refrigerator(PF_FREEZE); refrigerator(PF_FREEZE);
signr = 0; signr = 0;
ret = regs->gpr[3];
if (!signal_pending(current)) if (!signal_pending(current))
goto no_signal; goto no_signal;
} }
...@@ -719,7 +718,7 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs) ...@@ -719,7 +718,7 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
newsp = frame = 0; newsp = frame = 0;
signr = get_signal_to_deliver(&info, &ka, regs, NULL); signr = get_signal_to_deliver(&info, &ka, regs, NULL);
no_signal:
if (TRAP(regs) == 0x0C00 /* System Call! */ if (TRAP(regs) == 0x0C00 /* System Call! */
&& regs->ccr & 0x10000000 /* error signalled */ && regs->ccr & 0x10000000 /* error signalled */
&& ((ret = regs->gpr[3]) == ERESTARTSYS && ((ret = regs->gpr[3]) == ERESTARTSYS
...@@ -735,7 +734,6 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs) ...@@ -735,7 +734,6 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
regs->gpr[3] = EINTR; regs->gpr[3] = EINTR;
/* note that the cr0.SO bit is already set */ /* note that the cr0.SO bit is already set */
} else { } else {
no_signal:
regs->nip -= 4; /* Back up & retry system call */ regs->nip -= 4; /* Back up & retry system call */
regs->result = 0; regs->result = 0;
regs->trap = 0; regs->trap = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment