netns: use stable inode number for initial mount ns
authorChristian Brauner <brauner@kernel.org>
Fri, 6 Jun 2025 09:45:08 +0000 (11:45 +0200)
committerChristian Brauner <brauner@kernel.org>
Wed, 11 Jun 2025 09:59:08 +0000 (11:59 +0200)
commit9b0240b3ccc325c7a96cf362877180bc9e10d546
treeeacee4a3fe6794b52a141a1a5f6976f03bea38c7
parent6a9e2fb1bab53b54d02714a2ee3c6612d19629ce
netns: use stable inode number for initial mount ns

Apart from the network and mount namespace all other namespaces expose a
stable inode number and userspace has been relying on that for a very
long time now. It's very much heavily used API. Align the network
namespace and use a stable inode number from the reserved procfs inode
number space so this is consistent across all namespaces.

Link: https://lore.kernel.org/20250606-work-nsfs-v1-2-b8749c9a8844@kernel.org
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
include/linux/proc_ns.h
include/uapi/linux/nsfs.h
net/core/net_namespace.c