mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: herbert@13thfloor.at, akpm@osdl.org, viro@ftp.linux.org.uk,
	linux-kernel@vger.kernel.org
Cc: ebiederm@xmission.com, torvalds@osdl.org
Subject: Re: kjournald keeps reference to namespace
Date: Sat, 18 Feb 2006 18:12:43 +0100	[thread overview]
Message-ID: <20060218171243.GA23640@atjola.homenet> (raw)
In-Reply-To: <20060218163227.GA23344@atjola.homenet>

On 2006.02.18 17:32:27 +0100, Björn Steinbrink wrote:
> > In daemonize() a new thread gets cleaned up and 'merged' with init_task.
> > The current fs_struct is handled there, but not the current namespace.
> > The following patch adds the namespace part.
> > 
> > Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
> > ---
> 
> Oops, forgot the increment the namespace usage count...

Ok, this time with the get_namespace wrapper, thanks to Eric Biederman
for pointing that out to me.
---


diff -NurpP --minimal linux-2.6.16-rc4/kernel/exit.c linux-2.6.16-rc4-ns/kernel/exit.c
--- linux-2.6.16-rc4/kernel/exit.c	2006-02-18 13:59:59.000000000 +0100
+++ linux-2.6.16-rc4-ns/kernel/exit.c	2006-02-18 17:57:21.000000000 +0100
@@ -360,6 +360,9 @@ void daemonize(const char *name, ...)
 	fs = init_task.fs;
 	current->fs = fs;
 	atomic_inc(&fs->count);
+	exit_namespace(current);
+	current->namespace = init_task.namespace;
+	get_namespace(current->namespace);
  	exit_files(current);
 	current->files = init_task.files;
 	atomic_inc(&current->files->count);

  reply	other threads:[~2006-02-18 17:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-18  1:35 Herbert Poetzl
2006-02-18  1:54 ` Andrew Morton
2006-02-18  3:30   ` Herbert Poetzl
2006-02-24 21:28     ` Paul Collins
2006-02-24 21:36       ` Andrew Morton
2006-02-24 22:01         ` Paul Collins
2006-02-18 13:36 ` Björn Steinbrink
2006-02-18 16:32   ` Björn Steinbrink
2006-02-18 17:12     ` Björn Steinbrink [this message]
2006-02-19  2:32       ` Eric W. Biederman

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=20060218171243.GA23640@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=herbert@13thfloor.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=viro@ftp.linux.org.uk \
    /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®