From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Serge E. Hallyn" Subject: [PATCH 1/1] ipc namespace: initialize init_ipc_ns.count to 1 Date: Mon, 2 Mar 2009 19:45:04 -0600 Message-ID: <20090303014503.GA25323@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Linux Containers List-Id: containers.vger.kernel.org Any objections to this patch? >From cfecafff4d4b1bb0f8fd49eb8e19384b34a7dc22 Mon Sep 17 00:00:00 2001 From: Serge E. Hallyn Date: Mon, 2 Mar 2009 16:40:18 -0800 Subject: [PATCH 1/1] ipc namespace: initialize init_ipc_ns.count to 1 That's one count for the init task. Nothing else pins an ipc ns (i.e. not ipcns->mq_mnt). The only references to init_ipc_ns are the sysctl .data calculations, which should remain safe. Signed-off-by: Serge E. Hallyn --- ipc/msgutil.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/ipc/msgutil.c b/ipc/msgutil.c index e5d6da1..f095ee2 100644 --- a/ipc/msgutil.c +++ b/ipc/msgutil.c @@ -26,8 +26,7 @@ DEFINE_SPINLOCK(mq_lock); * and not CONFIG_IPC_NS. */ struct ipc_namespace init_ipc_ns = { - /* It's not for this patch to change, but should this be 1? */ - .count = ATOMIC_INIT(2), + .count = ATOMIC_INIT(1), #ifdef CONFIG_POSIX_MQUEUE .mq_queues_max = DFLT_QUEUESMAX, .mq_msg_max = DFLT_MSGMAX, -- 1.5.4.3