[PATCH] Revert "ckpt/powerpc: handle syscall restart"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux