Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754050Ab0LGWNU (ORCPT ); Tue, 7 Dec 2010 17:13:20 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:38772 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753275Ab0LGWNT (ORCPT ); Tue, 7 Dec 2010 17:13:19 -0500 Date: Tue, 7 Dec 2010 14:13:15 -0800 From: Andrew Morton To: Pavel Emelyanov Cc: Linux Containers , Linux Kernel Mailing List , "Serge E. Hallyn" Subject: Re: [PATCH] user_ns: Improve the user_ns on-the-slab packaging Message-Id: <20101207141315.5ea45abf.akpm@linux-foundation.org> In-Reply-To: <4CFE40D1.5000309@parallels.com> References: <4CFE40D1.5000309@parallels.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1043 Lines: 32 On Tue, 07 Dec 2010 17:12:33 +0300 Pavel Emelyanov wrote: > @@ -126,3 +128,11 @@ gid_t user_ns_map_gid(struct user_namespace *to, const struct cred *cred, gid_t > /* No useful relationship so no mapping */ > return overflowgid; > } > + > +static __init int user_namespaces_init(void) > +{ > + user_ns_cachep = KMEM_CACHE(user_namespace, SLAB_PANIC); > + return 0; > +} > + > +__initcall(user_namespaces_init); checkpatch (which you apparently didn't use) says WARNING: please use device_initcall() instead of __initcall() #81: FILE: kernel/user_namespace.c:138: +__initcall(user_namespaces_init); which was a somewhat random recommendation. I think I'll switch it to plain old module_init(). Presumably user-namespaces don't get used prior to initcalls being run. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/