From: James Morris <jmorris@namei.org>
To: Kirill Korotaev <dev@sw.ru>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
xemul@sw.ru, ebiederm@xmission.com, haveblue@us.ibm.com,
linux-kernel@vger.kernel.org, herbert@13thfloor.at,
devel@openvz.org, serue@us.ibm.com, sam@vilain.net
Subject: Re: [RFC][PATCH 1/2] Virtualization of UTS
Date: Fri, 24 Mar 2006 15:28:09 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.64.0603241519410.27657@excalibur.intercode> (raw)
In-Reply-To: <44242CE7.3030905@sw.ru>
On Fri, 24 Mar 2006, Kirill Korotaev wrote:
> This patch introduces utsname namespace in system, which allows to have
> different utsnames on the host.
> Introduces config option CONFIG_UTS_NS and uts_namespace structure for this.
>
Please include patches inline, so they can be quoted inline.
+#define system_utsname (current->uts_ns->name)
This should be a static inline.
+struct uts_namespace *create_uts_ns(void)
+{
+ struct uts_namespace *ns;
+
+ ns = kmalloc(sizeof(struct uts_namespace), GFP_KERNEL);
+ if (ns == NULL)
+ return NULL;
+
+ memset(&ns->name, 0, sizeof(ns->name));
+ atomic_set(&ns->cnt, 1);
+ return ns;
+}
IMHO, it's better to do something like:
{
foo = kmalloc();
if (foo) {
stuff;
etc;
}
return foo;
}
I suggest you use kzalloc(), too.
Also, I think the API approach needs to be determined before the patches
go into -mm, in case it impacts on the code.
next prev parent reply other threads:[~2006-03-24 20:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 17:23 [RFC] Virtualization patches for IPC/UTS. 2nd step Kirill Korotaev
2006-03-24 17:31 ` [RFC][PATCH 1/2] Virtualization of UTS Kirill Korotaev
2006-03-24 19:09 ` Eric W. Biederman
2006-03-24 19:35 ` Kirill Korotaev
2006-03-24 19:50 ` Eric W. Biederman
2006-03-27 19:40 ` Eric W. Biederman
2006-03-24 20:28 ` James Morris [this message]
2006-03-28 3:45 ` Sam Vilain
2006-03-24 17:35 ` [RFC][PATCH 2/2] Virtualization of IPC Kirill Korotaev
2006-03-24 19:13 ` Dave Hansen
2006-03-24 21:27 ` Herbert Poetzl
2006-03-28 5:26 ` Sam Vilain
2006-03-24 20:09 ` Eric W. Biederman
2006-03-27 15:33 ` 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=Pine.LNX.4.64.0603241519410.27657@excalibur.intercode \
--to=jmorris@namei.org \
--cc=akpm@osdl.org \
--cc=dev@sw.ru \
--cc=devel@openvz.org \
--cc=ebiederm@xmission.com \
--cc=haveblue@us.ibm.com \
--cc=herbert@13thfloor.at \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@vilain.net \
--cc=serue@us.ibm.com \
--cc=torvalds@osdl.org \
--cc=xemul@sw.ru \
/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
Powered by JetHome