Re: [PATCH] pid: cosmetic changes to alloc_pid()
From: Oleg Nesterov
Date: Sat Mar 07 2026 - 07:11:43 EST
On 03/07, Mateusz Guzik wrote:
>
> On Sat, Mar 7, 2026 at 10:23 AM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> >
> > On 03/06, Mateusz Guzik wrote:
> > >
> > > Commit 6d864a1b182532e7 ("pid: only take pidmap_lock once on alloc")
> > > landed v2 of the patch instead of v3. This patch remedies the problem.
> > >
> > > No functional changes.
> > >
> > > Signed-off-by: Mateusz Guzik <mjguzik@xxxxxxxxx>
> >
> > The patch looks obviously good, but it conflicts with Pavel's
> >
> > [PATCH v4 0/4] pid_namespace: make init creation more flexible
> > https://lore.kernel.org/all/20260225133229.550302-1-ptikhomirov@xxxxxxxxxxxxx/#t
> >
> > In particular, this change:
> >
> > - for (tmp = ns, i = ns->level; i >= 0; i--) {
> > + for (tmp = ns, i = ns->level; i >= 0;) {
> >
> > With 2/4 from Pavel we need to decrement "i" before the ->child_reaper
> > check.
> >
>
> That patch will be fine as it modifies the other loop which already
> had i-- towards the end.
>
> So I don't think there is any need to rebase.
Indeed, I misread your patch, sorry for noise.
Oleg.