]> Gentwo Git Trees - linux/.git/commit
nstree: maintain list of owned namespaces
authorChristian Brauner <brauner@kernel.org>
Wed, 29 Oct 2025 12:20:29 +0000 (13:20 +0100)
committerChristian Brauner <brauner@kernel.org>
Mon, 3 Nov 2025 16:41:17 +0000 (17:41 +0100)
commit3c1a52f2a6c865464babe7a85c2796aa31cc9744
tree471aadad5cbb7065da904ea1b3c28c4bf3746282
parent3760342fd6312416491d536144e39297fa5b1950
nstree: maintain list of owned namespaces

The namespace tree doesn't express the ownership concept of namespace
appropriately. Maintain a list of directly owned namespaces per user
namespace. This will allow userspace and the kernel to use the listns()
system call to walk the namespace tree by owning user namespace. The
rbtree is used to find the relevant namespace entry point which allows
to continue iteration and the owner list can be used to walk the tree
completely lock free.

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-16-2e6f823ebdc0@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
include/linux/ns_common.h
kernel/nscommon.c
kernel/nstree.c