Skip to content

ns: tweak ns common handling

Christian Brauner cgroups linux-fsdevel netdev oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected] change-id 20250924-work-namespaces-fixes-99d0c1ce2d86

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nstree: make struct ns_tree privateinclude/linux/nstree.h kernel/nstree.c+13 -131 reply
2/3ns: move ns type into struct ns_commonfs/namespace.c fs/nsfs.c include/linux/ns_common.h +16 more+52 -351 reply
3/3ns: drop assertkernel/nscommon.c+0 -21 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJan Kara
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] ns: tweak ns common handling

This contains three minor tweaks for namespace handling:

* Make struct ns_tree private. There's no need for anything to access that directly.

* Drop a debug assert that would trigger in conditions that are benign.

* Move the type of the namespace out of struct proc_ns_operations and into struct ns_common. This eliminates a pointer dereference and also allows assertions to work when the namespace type is disabled and the operations field set to NULL.

"Trust me, just one more fixes series, bro. Just one more, bro."

---
Christian Brauner (3):
nstree: make struct ns_tree private
ns: move ns type into struct ns_common
ns: drop assert

 fs/namespace.c            |  6 +++---
 fs/nsfs.c                 | 18 +++++++++---------
 include/linux/ns_common.h | 30 +++++++++++++++++++++++++-----
 include/linux/nstree.h    | 13 -------------
 include/linux/proc_ns.h   |  1 -
 init/version-timestamp.c  |  1 +
 ipc/msgutil.c             |  1 +
 ipc/namespace.c           |  1 -
 kernel/cgroup/cgroup.c    |  1 +
 kernel/cgroup/namespace.c |  1 -
 kernel/nscommon.c         |  7 +++----
 kernel/nsproxy.c          |  4 ++--
 kernel/nstree.c           | 21 +++++++++++++++++----
 kernel/pid.c              |  1 +
 kernel/pid_namespace.c    |  2 --
 kernel/time/namespace.c   |  3 +--
 kernel/user.c             |  1 +
 kernel/user_namespace.c   |  1 -
 kernel/utsname.c          |  1 -
 net/core/net_namespace.c  |  1 -
 20 files changed, 65 insertions(+), 50 deletions(-)

---
base-commit: d969328c513c6679b4be11a995ffd4d184c25b34
change-id: 20250924-work-namespaces-fixes-99d0c1ce2d86