From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
"Nikita V. Youshchenko"
<yoush-/llMDZXAvAOHXe+LvDLADg@public.gmane.org>,
leo-n4oKp6kCDthKyFCjRbgQbg@public.gmane.org
Subject: Re: [PATCH] c/r: fix "scheduling in atomic" while restoring ipc shm
Date: Tue, 02 Mar 2010 16:59:20 -0500 [thread overview]
Message-ID: <4B8D8A38.4060702@cs.columbia.edu> (raw)
In-Reply-To: <20100302174855.GA16352-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Serge E. Hallyn wrote:
> Quoting Nikita V. Youshchenko (yoush-/llMDZXAvAOHXe+LvDLADg@public.gmane.org):
>>> 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...
Actually, perms->seq (ipc->seq) is set correctly when the object
is allocated in ipc_addid(). It was redundant to explicitly restore
it in restore_load_ipc_perms().
Oren.
>
> From 809cc2f1eccc39d45a145e280b6d992e4fa1e683 Mon Sep 17 00:00:00 2001
> From: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> Date: Tue, 2 Mar 2010 05:43:21 -0600
> Subject: [PATCH 1/1] restore perm->seq
>
> Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
> 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,
next prev parent reply other threads:[~2010-03-02 21:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-24 16:02 Scheduling in atomic while restoring shm Nikita V. Youshchenko
[not found] ` <201002241902.19623-G0jJXfdb3EhtNF42gJWJKsm+4N3/VObd@public.gmane.org>
2010-02-24 23:31 ` [PATCH] c/r: fix "scheduling in atomic" while restoring ipc shm Oren Laadan
[not found] ` <1267054267-2819-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-02-25 2:53 ` Oren Laadan
[not found] ` <4B85E62B.90804-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-03-02 14:50 ` Nikita V. Youshchenko
[not found] ` <201003021750.47123-G0jJXfdb3EhtNF42gJWJKsm+4N3/VObd@public.gmane.org>
2010-03-02 17:48 ` Serge E. Hallyn
[not found] ` <20100302174855.GA16352-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-02 21:59 ` Oren Laadan [this message]
2010-03-02 22:09 ` Oren Laadan
[not found] ` <4B8D8C7D.2050004-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-03-02 23:17 ` Serge E. Hallyn
[not found] ` <20100302231716.GA4594-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-02 23:40 ` Serge E. Hallyn
2010-03-03 20:31 ` [PATCH] c/r: fix ipc scheduling while atomic - take 3 Oren Laadan
[not found] ` <1267648296-5517-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-03-03 23:06 ` Serge E. Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B8D8A38.4060702@cs.columbia.edu \
--to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=leo-n4oKp6kCDthKyFCjRbgQbg@public.gmane.org \
--cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=yoush-/llMDZXAvAOHXe+LvDLADg@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox