From: Pavel <xemul@openvz.org>
To: Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Serge Hallyn <serue@us.ibm.com>,
ebiederm@xmission.com, clg@fr.ibm.com
Cc: Kirill Korotaev <dev@openvz.org>
Subject: [PATCH] nsproxy cloning error path fix
Date: Thu, 31 Aug 2006 14:21:58 +0400 [thread overview]
Message-ID: <44F6B846.9090405@openvz.org> (raw)
This patch fixes copy_namespaces()'s error path.
when new nsproxy (new_ns) is created pointers to namespaces (ipc, uts)
are copied from the old nsproxy. Later in copy_utsname, copy_ipcs, etc.
according namespaces are get-ed. On error path needed namespaces are
put-ed, so there's no need to put new nsproxy itelf as it woud cause
putting namespaces for the second time.
Found when incorporating namespaces into OpenVZ kernel.
Signed-off-by: Pavel Emelianov <xemul@openvz.org>
---
nsproxy.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- ./kernel/nsproxy.c.veboot 2006-08-30 17:48:59.000000000 +0400
+++ ./kernel/nsproxy.c 2006-08-31 10:54:56.000000000 +0400
@@ -115,7 +115,7 @@ out_uts:
put_namespace(new_ns->namespace);
out_ns:
tsk->nsproxy = old_ns;
- put_nsproxy(new_ns);
+ kfree(new_ns);
goto out;
}
next reply other threads:[~2006-08-31 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 10:21 Pavel [this message]
2006-08-31 11:59 ` 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=44F6B846.9090405@openvz.org \
--to=xemul@openvz.org \
--cc=akpm@osdl.org \
--cc=clg@fr.ibm.com \
--cc=dev@openvz.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
/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
all inboxes | Powered by JetHome®