From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: [PATCH 1/1] cr: don't unlock ipc before freeing
Date: Fri, 29 May 2009 17:37:35 -0400 [thread overview]
Message-ID: <4A20559F.5020807@cs.columbia.edu> (raw)
In-Reply-To: <20090529212132.GA12973-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
It's in.
Serge E. Hallyn wrote:
> Sorry, this should have been a part of the analogous sem fix.
>
> [re commit 615744ad97 ... c/r: support share-memory sysv-ipc]
>
> Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
> ipc/checkpoint_msg.c | 4 ++--
> ipc/checkpoint_shm.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/ipc/checkpoint_msg.c b/ipc/checkpoint_msg.c
> index a988a9e..fb1a61e 100644
> --- a/ipc/checkpoint_msg.c
> +++ b/ipc/checkpoint_msg.c
> @@ -348,12 +348,12 @@ int restore_ipc_msg(struct ckpt_ctx *ctx)
> msq->q_qnum = h->q_qnum;
>
> ret = load_ipc_msg_hdr(ctx, h, msq);
> - ipc_unlock(perms);
>
> if (ret < 0) {
> ckpt_debug("msq: need to remove (%d)\n", ret);
> freeque(current->nsproxy->ipc_ns, perms);
> - }
> + } else
> + ipc_unlock(perms);
> up_write(&msg_ids->rw_mutex);
> out:
> free_msg_list(&messages); /* no-op if all ok, else cleanup msgs */
> diff --git a/ipc/checkpoint_shm.c b/ipc/checkpoint_shm.c
> index 713f910..0d8eb14 100644
> --- a/ipc/checkpoint_shm.c
> +++ b/ipc/checkpoint_shm.c
> @@ -239,7 +239,6 @@ int restore_ipc_shm(struct ckpt_ctx *ctx)
> get_file(file);
>
> ret = load_ipc_shm_hdr(ctx, h, shp);
> - ipc_unlock(perms);
> if (ret < 0)
> goto mutex;
>
> @@ -253,7 +252,8 @@ int restore_ipc_shm(struct ckpt_ctx *ctx)
> if (ret < 0) {
> ckpt_debug("shm: need to remove (%d)\n", ret);
> do_shm_rmid(current->nsproxy->ipc_ns, perms);
> - }
> + } else
> + ipc_unlock(perms);
> up_write(&shm_ids->rw_mutex);
> out:
> ckpt_hdr_put(ctx, h);
prev parent reply other threads:[~2009-05-29 21:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 21:21 [PATCH 1/1] cr: don't unlock ipc before freeing Serge E. Hallyn
[not found] ` <20090529212132.GA12973-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-05-29 21:37 ` Oren Laadan [this message]
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=4A20559F.5020807@cs.columbia.edu \
--to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@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