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 <n...@pobox.com>
---
 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
contain...@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
Devel@openvz.org
https://openvz.org/mailman/listinfo/devel

Reply via email to