From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Emelyanov Subject: Re: [PATCH 3/3] Switch IPC namespace to use sysctl shadows Date: Wed, 21 Nov 2007 12:21:06 +0300 Message-ID: <4743F882.7010607@openvz.org> References: <4742C73C.3010904@openvz.org> <4742C95D.1040907@openvz.org> <1195579453.29578.8.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1195579453.29578.8.camel@localhost> 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: Dave Hansen Cc: Linux Containers , Cedric Le Goater , "Eric W. Biederman" List-Id: containers.vger.kernel.org Dave Hansen wrote: > On Tue, 2007-11-20 at 14:47 +0300, Pavel Emelyanov wrote: >> >> +int ipc_clone_sysctl(struct ipc_namespace *ns) >> +{ >> + struct ctl_table_header *h; >> + struct ctl_table *t; >> + >> + h = create_sysctl_shadow(init_ipc_ns.ctl_head); >> + if (h == NULL) >> + return -ENOMEM; >> + >> + t = h->ctl_table->child; >> + >> + t[0].data = &ns->shm_ctlmax; >> + t[1].data = &ns->shm_ctlall; >> + t[2].data = &ns->shm_ctlmni; >> + t[3].data = &ns->msg_ctlmax; >> + t[4].data = &ns->msg_ctlmni; >> + t[5].data = &ns->msg_ctlmnb; >> + t[6].data = &ns->sem_ctls; >> + >> + ns->ctl_head = h; >> + return 0; >> +} > >>>From where does the order for these things come? >From the original tables. > -- Dave > >