From: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
To: Yohei Kojima <yk@y-koj.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
driver-core@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] debugfs: warn if file creation failed due to uninitialized debugfs
Date: Thu, 3 Sep 2026 17:41:11 +0500 [thread overview]
Message-ID: <20260903124111.87353-1-mikhail.v.gavrilov@gmail.com> (raw)
In-Reply-To: <ai0m0atzc0cXT0yQ@desktop.y-koj.net>
On Sat, Jun 13, 2026 at 06:45:53PM +0900, Yohei Kojima wrote:
> > While I understand your frustration when adding new code to the kernel
> > that would trigger this, does it actually fail on a normal boot today?
>
> No. As far as I tested, no existing code faied there.
It does, with CONFIG_REF_TRACKER=y and CONFIG_DEBUG_FS=y. Since this
commit every boot here prints:
debugfs: Unable to create file 'net_refcnt@(____ptrval____)',
debugfs is not initialized yet
debugfs: Unable to create file 'net_notrefcnt@(____ptrval____)',
debugfs is not initialized yet
This is not a race. net_ns_init() is called directly from start_kernel(),
before any initcall runs, and debugfs_init() is a core_initcall, so
init_net's two ref_tracker directories always miss. Nothing is actually
lost - net/core/net_namespace.c re-registers them from a late_initcall(),
and both files are present under /sys/kernel/debug/ref_tracker/ once the
system is up - but the error is printed before that happens.
I bisected it to this commit and sent a fix that keeps the warning for the
case you were after:
https://lore.kernel.org/all/20260903115135.63210-1-mikhail.v.gavrilov@gmail.com/
--
Thanks,
Mikhail
prev parent reply other threads:[~2026-09-03 12:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 13:50 Yohei Kojima
2026-06-12 8:14 ` Greg Kroah-Hartman
2026-06-13 9:45 ` Yohei Kojima
2026-09-03 12:41 ` Mikhail Gavrilov [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=20260903124111.87353-1-mikhail.v.gavrilov@gmail.com \
--to=mikhail.v.gavrilov@gmail.com \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=yk@y-koj.net \
/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®