public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrew Morton <akpm@osdl.org>,
	video4linux-list@redhat.com, kraxel@bytesex.org,
	Containers@lists.osdl.org, linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH] kthread: saa7134-tvaudio.c
Date: Wed, 30 Aug 2006 06:39:49 -0600	[thread overview]
Message-ID: <m164gafld6.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <m1k64rf9om.fsf@ebiederm.dsl.xmission.com> (Eric W. Biederman's message of "Tue, 29 Aug 2006 16:39:53 -0600")

ebiederm@xmission.com (Eric W. Biederman) writes:

> Andrew Morton <akpm@osdl.org> writes:
>
>> So in general, yes, the driver should be converted to the kthread API -
>> this is a requirement for virtualisation, but I forget why, and that's the
>> "standard" way of doing it.
>
> With the kthread api new kernel threads are started as children of keventd
> in well defined circumstances.  If you don't do this kernel threads
> can wind up sharing weird parts of a parent process's resources and
> locking resources in the kernel long past the time when they are
> actually used by anything a user space process can kill.
>
> We have actually witnessed this problem with the kernels filesystem mount
> namespace.  Mostly daemonize in the kernel unshares everything that
> could be a problem but the problem is sufficiently subtle it makes
> more sense to the change kernel threads.  So these weird and subtle
> dependencies go away.
>
> So in essence the container work needs the new kthread api for the
> same reasons everyone else does it is just more pronounced in that
> case.

That plus the obvious bit.  For the pid namespace we have to declare
war on people storing a pid_t values.  Either converting them to
struct pid * or removing them entirely.  Doing the kernel_thread to
kthread conversion removes them entirely.

Eric

  reply	other threads:[~2006-08-30 12:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29 21:15 [PATCH] kthread: saa7134-tvaudio.c Sukadev Bhattiprolu
2006-08-29 21:22 ` Dave Hansen
2006-08-29 21:39 ` Andrew Morton
2006-08-29 22:39   ` Eric W. Biederman
2006-08-30 12:39     ` Eric W. Biederman [this message]
2006-08-30 14:07       ` Cedric Le Goater
2006-08-30 15:43         ` Eric W. Biederman
2006-08-30 16:18           ` Cedric Le Goater
2006-08-30 16:35             ` [Devel] " Kirill Korotaev
2006-08-30 16:38             ` Kir Kolyshkin
2006-08-30 16:30   ` Cedric Le Goater
2006-08-30 16:49     ` Andrew Morton
2006-08-30 17:36       ` Mauro Carvalho Chehab
2006-08-31  1:02         ` Sukadev Bhattiprolu
2006-08-31  1:05         ` [PATCH] kthread: tvaudio.c Sukadev Bhattiprolu

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=m164gafld6.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=Containers@lists.osdl.org \
    --cc=akpm@osdl.org \
    --cc=kraxel@bytesex.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=video4linux-list@redhat.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