From: sashiko-bot@kernel.org
To: "Vladislav Zaharov" <vladazaharova2018@gmail.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
dri-devel@lists.freedesktop.org,
"Alexandre Courbot" <acourbot@nvidia.com>
Subject: Re: [PATCH v4 1/3] gpu: nova-core: move the debugfs root into the module data
Date: Sun, 13 Sep 2026 18:47:13 +0000 [thread overview]
Message-ID: <20260913184714.03E301F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260913183734.134307-2-vladazaharova2018@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing invariant comment for `DebugfsData` construction
--
commit f5ca13df2d92dfa80fcdd81e199934e5ce48a7c2
Author: Vladislav Zaharov <vladazaharova2018@gmail.com>
gpu: nova-core: move the debugfs root into the module data
This commit moves the debugfs root directory into a new DebugfsData
structure owned by the module, instead of using a static mut with a guard
type. This prevents leaks where a failing driver registration would leave
the directory lingering.
> diff --git a/drivers/gpu/nova-core/nova_core.rs b/drivers/gpu/nova-core/nova_core.rs
> --- a/drivers/gpu/nova-core/nova_core.rs
> +++ b/drivers/gpu/nova-core/nova_core.rs
[ ... ]
> +impl DebugfsData {
> + /// Creates the shared data and publishes it, so that [`debugfs_data()`] can hand it out.
> + fn new() -> impl PinInit<Self> {
> + pin_init!(&this in Self {
> + root: debugfs::Dir::new(c"nova-core"),
> + _: {
> + // SAFETY: Module initialization runs once and before the driver is registered, so
> + // nothing can be reading `DEBUGFS_DATA` while it is written here. `this` is where
> + // the data is being built, and it stays there: the module data never moves.
> + unsafe { DEBUGFS_DATA = this.as_ptr() };
> + },
> + })
> + }
[Severity: Low]
Is an // INVARIANT: comment missing here? DebugfsData has a documented
invariant, and is being constructed here via pin_init!, but there is no
comment explaining how the invariants are satisfied.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260913183734.134307-1-vladazaharova2018@gmail.com?part=1
next prev parent reply other threads:[~2026-09-13 18:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 18:37 [PATCH v4 0/3] gpu: nova-core: retain the GSP-RM log buffers Vladislav Zaharov
2026-09-13 18:37 ` [PATCH v4 1/3] gpu: nova-core: move the debugfs root into the module data Vladislav Zaharov
2026-09-13 18:47 ` sashiko-bot [this message]
2026-09-13 18:37 ` [PATCH v4 2/3] gpu: nova-core: gsp: retain the GSP-RM log buffers after unbind Vladislav Zaharov
2026-09-13 18:47 ` sashiko-bot
2026-09-13 18:37 ` [PATCH v4 3/3] Documentation: nova: remove completed GSP log buffer task Vladislav Zaharov
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=20260913184714.03E301F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acourbot@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vladazaharova2018@gmail.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 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.