Re: [GIT PULL] Networking for v6.17

From: Linus Torvalds
Date: Wed Jul 30 2025 - 12:21:19 EST


On Sat, 26 Jul 2025 at 18:35, Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> Networking changes for 6.17.

So while merging this, there was a trivial conflict with commit
9b0240b3ccc3 ("netns: use stable inode number for initial mount ns")
from the vfs side (acked by networking people).

And the conflict wasn't hard to resolve, but while looking at it, I
got very unhappy with that conflicting commit from the vfs tree.

Christian - when the "use stable inode number" code triggers, it
bypasses ns_alloc_inum() entirely. Fine - except that function *also*
does that

WRITE_ONCE(ns->stashed, NULL);

so now ns->stashed isn't initialized any more.

Now, that shouldn't matter here because this only triggers for
'init_net' that is a global data structure and thus initialized to all
zeroes anyway, but it makes me very unhappy about that pattern that
ends up being about allocating the pid, but also almost incidentally
initializing that 'stashed' entry.

I ended up re-organizing the net_ns_net_init() code a bit (because it
now does that debugfs setup on success, so the old "return 0" didn't
work), and I think the merge is fine, but I think this "don't call
ns_alloc_inum()" pattern is wrong.

IOW, I don't think this is a bug, but I think it's not great.

Linus