mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: linux-fsdevel@vger.kernel.org, Christian Brauner <brauner@kernel.org>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	 kernel test robot <yi1.lai@intel.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] ns: don't add init_ipc_ns and init_net without namespace support
Date: Fri, 30 Oct 2026 17:18:01 +0100	[thread overview]
Message-ID: <20261030-labil-bergab-besetzen-9a2b7d8d71ac@brauner> (raw)
In-Reply-To: <20261030-work-nsfs-init_ns_tree-v1-1-7ec0adb47c54@kernel.org>

On Fri, 30 Oct 2026 16:50:07 +0100, Christian Brauner wrote:
> When CONFIG_IPC_NS or CONFIG_NET_NS are turned off we still add the
> initial ipc and network namespace to the namespace trees. ipc_ns_init()
> calls ns_tree_add(&init_ipc_ns) whenever CONFIG_SYSVIPC is set and
> setup_net() calls ns_tree_add_raw() on init_net whenever CONFIG_NET is
> set.
> 
> But without CONFIG_IPC_NS and CONFIG_NET_NS these aren't namespaces
> userspace can do anything with. They don't have proc_ns_operations so
> there's no /proc/<pid>/ns/{ipc,net} for them, nsfs_fh_to_dentry()
> refuses them with -EOPNOTSUPP, and since ns->ops is NULL
> __ns_tree_add_raw() doesn't add them to the owner list of init_user_ns
> either. So they end up half registered. That's also not how we treat
> any of the other namespace types. Without CONFIG_UTS_NS, CONFIG_PID_NS,
> CONFIG_TIME_NS or CONFIG_USER_NS the initial namespace is never added
> to the tree.
> 
> [...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] ns: don't add init_ipc_ns and init_net without namespace support
      https://git.kernel.org/vfs/vfs/c/82f1c815aaef


      reply	other threads:[~2026-10-30 16:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 15:50 Christian Brauner
2026-10-30 16:18 ` Christian Brauner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261030-labil-bergab-besetzen-9a2b7d8d71ac@brauner \
    --to=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yi1.lai@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®