mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
ns: add asserts for active refcount underflow
Add a few more assert to detect active reference count underflows. Link: https://patch.msgid.link/20251109-namespace-6-19-fixes-v1-6-ae8a4ad5a3b3@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
@@ -294,7 +294,6 @@ void __ns_ref_active_put(struct ns_common *ns);
|
||||
|
||||
static __always_inline struct ns_common *__must_check ns_get_unless_inactive(struct ns_common *ns)
|
||||
{
|
||||
VFS_WARN_ON_ONCE(__ns_ref_active_read(ns) && !__ns_ref_read(ns));
|
||||
if (!__ns_ref_active_read(ns)) {
|
||||
VFS_WARN_ON_ONCE(is_ns_init_id(ns));
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user