Linux Container Development
 help / color / mirror / Atom feed
* [PATCH] Revert "ckpt/powerpc: handle syscall restart"
@ 2010-03-12 18:26 Nathan Lynch
       [not found] ` <1268418393-18325-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Nathan Lynch @ 2010-03-12 18:26 UTC (permalink / raw)
  To: Oren Laadan; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

This reverts commit 64dab5da66f4fe212b43272ffa5e7a3403a64deb.

This way of handling syscall restart is incorrect -- it occurs too
early in the restart process, and restore_retval is doing the wrong
thing for powerpc anyway (fixed in a later patch).  While the reverted
patch managed to address the case of system calls with restart blocks,
other restartable system calls behave incorrectly after restart.
---
 arch/powerpc/kernel/checkpoint.c |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/arch/powerpc/kernel/checkpoint.c b/arch/powerpc/kernel/checkpoint.c
index cd384df..2634011 100644
--- a/arch/powerpc/kernel/checkpoint.c
+++ b/arch/powerpc/kernel/checkpoint.c
@@ -307,31 +307,6 @@ static int restore_gprs(const struct ckpt_hdr_cpu *cpu_hdr,
 	regs->orig_gpr3 = cpu_hdr->orig_gpr3;
 
 	regs->msr = sanitize_msr(regs->msr);
-
-	/* The normal servicing of the freezer's fake signal is
-	 * short-circuited by checkpoint/restart.  See
-	 * arch/powerpc/kernel/signal.c::do_signal_pending().
-	 */
-	if (TRAP(regs) != 0x0C00)
-		goto out;
-	if (!(regs->ccr & 0x10000000))
-		goto out;
-
-	switch (regs->gpr[3]) {
-	case ERESTARTNOHAND:
-	case ERESTARTSYS:
-	case ERESTARTNOINTR:
-		regs->gpr[3] = regs->orig_gpr3;
-		break;
-	case ERESTART_RESTARTBLOCK:
-		regs->gpr[0] = __NR_restart_syscall;
-		break;
-	default:
-		goto out;
-	}
-
-	regs->nip -= 4;
-	regs->result = 0;
 out:
 	return rc;
 }
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-15  2:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-12 18:26 [PATCH] Revert "ckpt/powerpc: handle syscall restart" Nathan Lynch
     [not found] ` <1268418393-18325-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2010-03-12 18:26   ` [PATCH] use correct ccr bit for syscall error status Nathan Lynch
     [not found]     ` <1268418393-18325-2-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2010-03-12 18:57       ` Nathan Lynch
2010-03-12 18:26   ` [PATCH] checkpoint: use syscall_get_error Nathan Lynch
     [not found]     ` <1268418393-18325-3-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2010-03-12 18:59       ` Nathan Lynch
     [not found]         ` <1268420378.3763.38.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-12 19:35           ` Serge E. Hallyn
2010-03-15  2:51   ` [PATCH] Revert "ckpt/powerpc: handle syscall restart" Oren Laadan

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