[PATCH 3/3] checkpoint/powerpc: warn if full register state unavailable

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

 



Emit a warning if we attempt to checkpoint a task for which the user
nonvolatile register state (r13-r31) has not been saved.  This should
not ever happen.

Signed-off-by: Nathan Lynch <ntl@xxxxxxxxx>
---
 arch/powerpc/mm/checkpoint.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/mm/checkpoint.c b/arch/powerpc/mm/checkpoint.c
index de18467..2634011 100644
--- a/arch/powerpc/mm/checkpoint.c
+++ b/arch/powerpc/mm/checkpoint.c
@@ -107,6 +107,8 @@ static void checkpoint_gprs(struct ckpt_hdr_cpu *cpu_hdr,
 
 	cpu_hdr->pt_regs_size = sizeof(*pt_regs);
 	pt_regs = task_pt_regs(task);
+	WARN_ON(!FULL_REGS(pt_regs));
+
 	cpu_hdr->pt_regs = *pt_regs;
 
 	if (task == current)
-- 
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