Re: [RFC PATCH v4 03/14] rootns: Track init lifecycle via copy_process() and pid_namespace

From: Jarkko Sakkinen

Date: Fri Nov 20 2026 - 10:25:07 EST


On Fri, Nov 20, 2026 at 03:30:21PM +0200, Jarkko Sakkinen wrote:
> On Fri, Nov 20, 2026 at 02:18:43PM +0100, Alexander Mikhalitsyn wrote:
> > Dear Jarkko,
> >
> > >   acct_exit_ns(pid_ns);
> > > + exit_rootns(pid_ns, me);
> >
> > We have a very similar mechanism around pidfd's to track exit
> > information for a task. As far as I can see we already have (struct
> > rootns *)->init_pid reference, so we can get exit information for free
> > (look for PIDFD_INFO_EXIT).
>
> Thanks for mentioning. I'll see if I can leverage it.
>
> If something like this is found, it is partly due long history of this
> code i.e., not planned/opionated choice :-)

This non-doable or incompatible at least. I'm not sure if that would
have gain. I think this goes to acceptable redundancy. Or at least,
currently think this way.

Br, Jarkko