Quoting Nikita V. Youshchenko (yo...@cs.msu.su):
> > Hi Nikita,
> >
> > Thanks for the report and the analysis. It actually helped to
> > pinpoint a couple of other minor issues in the code. This patch
> > should fix all of these.
> >
> > Oren.
> 
> Hi Oren.
> 
> With ckpt-v19 plus this patch applied, we still are getting a kernel
> crash, with BUG() fired at
> +       ipc = idr_find(&msg_ids->ipcs_idr, h->perms.id);
> +       BUG_ON(!ipc);
> added by the patch.
> 
> By looking at the code, I can't understand how this idr_find() can at
> all succeed, if the namespace it is looking in was just created and
> is empty.
> 
> What code adds object in question into this idr?

The do_semget() in ipc/checkpoint_sem.c:restore_ipc_sem() does that.
At the very least Oren's comment was wrong in that perms->seq will
not get restored unless we continue to do it explicitly.  With the
following trivial patch I sometimes get success, but usually not.
Still trying to find what's up...

>From 809cc2f1eccc39d45a145e280b6d992e4fa1e683 Mon Sep 17 00:00:00 2001
From: Serge E. Hallyn <se...@us.ibm.com>
Date: Tue, 2 Mar 2010 05:43:21 -0600
Subject: [PATCH 1/1] restore perm->seq

Signed-off-by: Serge E. Hallyn <se...@us.ibm.com>
---
 ipc/checkpoint.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ipc/checkpoint.c b/ipc/checkpoint.c
index 06027c2..f865471 100644
--- a/ipc/checkpoint.c
+++ b/ipc/checkpoint.c
@@ -210,6 +210,7 @@ int restore_load_ipc_perms(struct ckpt_ctx *ctx,
        perm->cuid = h->cuid;
        perm->cgid = h->cgid;
        perm->mode = h->mode;
+       perm->seq = h->seq;
 
        return security_restore_obj(ctx, (void *)perm,
                                    CKPT_SECURITY_IPC,
-- 
1.6.0.6


-serge
_______________________________________________
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