Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Unverified Commit 9b3e1504 authored by Christian Brauner's avatar Christian Brauner
Browse files

pidfs: handle kernels without namespaces cleanly

The nsproxy structure contains nearly all of the namespaces associated
with a task. When a given namespace type is not supported by this kernel
the rules whether the corresponding pointer in struct nsproxy is NULL or
always init_<ns_type>_ns differ per namespace. Ideally, that wouldn't be
the case and for all namespace types we'd always set it to
init_<ns_type>_ns when the corresponding namespace type isn't supported.

Make sure we handle all namespaces where the pointer in struct nsproxy
can be NULL when the namespace type isn't supported.

Link: https://lore.kernel.org/r/20240722-work-pidfs-e6a83030f63e@brauner
Fixes: 5b08bd40

 ("pidfs: allow retrieval of namespace file descriptors") # mainline only
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent f60d38cb
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment