Re: Linux 2.4.8-ac5

Andrew Morton (akpm@zip.com.au)
Wed, 15 Aug 2001 11:09:49 -0700


"Udo A. Steinberg" wrote:
>
> Andrew Morton wrote:
> >
> > Interesting that kpnpbiosd has a ppid of zero, whereas keventd, which
> > is started a few statements later has a ppid of one. hmmm..
>
> [...]
>
> > I bet this ancient reparent-kernel-thread-to-init patch fixes it. It always
> > does.
>
> It does indeed. Nice work, Andrew - works like a charm. Formerly the kpnpbios
> thread never exited, which is why the problem never showed, now it exits ok.
> I've rediffed your patch against 2.4.8-ac5, because I was getting rejects -
> in case Alan wants to apply it to his tree.
>

I think it's not ready. One possible problem is if a process
starts a kernel thread, then that thread calls daemonize() and
then someone waits on the thread's exit. With this patch they'll
hang, because the thread switched parents. I don't know if that
happens at present, but I suspect a better API is to make
reparent_to_init() a standalone API function, and call that from
places where it's appropriate.

Also, it should do other things like set the thread's UID, scheduling
parameters, etc to something sane (just copy them in from init_task).

So sigh. I guess I need to finish this off. But right now
I'm having too much fun writing
prepopulate-the-pagecache-with-stuff-to-make-it-boot-faster.c :)

-
-
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/