From: Al Viro <viro@zeniv.linux.org.uk>
To: Joel Savitz <jsavitz@redhat.com>
Cc: linux-kernel@vger.kernel.org, Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH] kernel/nsproxy: guard all put_*_ns() calls
Date: Wed, 7 May 2025 22:26:00 +0100 [thread overview]
Message-ID: <20250507212600.GZ2023217@ZenIV> (raw)
In-Reply-To: <20250507161328.156909-1-jsavitz@redhat.com>
On Wed, May 07, 2025 at 12:13:28PM -0400, Joel Savitz wrote:
> In free_nsproxy() and the error path of create_new_namespaces() all
> calls to put_*_ns() are guarded by a null pointer check except for
> put_cgroup_ns() and put_net(). When CONFIG_NET_NS or CONFIG_GROUP is
> unset, either of these functions may be called with a NULL argument.
> This may or may not be handled correctly, but at the very least it is
> certainly quicker to just perform the null check in all cases.
Why not simply make put_net(NULL) et.al. no-op instead?
next prev parent reply other threads:[~2025-05-07 21:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 16:13 [PATCH] kernel/nsproxy: guard all put_*_ns() calls Joel Savitz
2025-05-07 21:26 ` Al Viro [this message]
2025-05-08 18:55 ` Joel Savitz
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=20250507212600.GZ2023217@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=brauner@kernel.org \
--cc=jsavitz@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.