From: Danilo Krummrich <dakr@kernel.org>
To: Aaron Thompson <dev@aaront.org>
Cc: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Lyude Paul <lyude@redhat.com>, David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>, Timur Tabi <ttabi@nvidia.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] drm/nouveau: Do not fail module init on debugfs errors
Date: Fri, 4 Jul 2025 00:23:11 +0200 [thread overview]
Message-ID: <aGcCz5VU1lbi_ZxD@pollux> (raw)
In-Reply-To: <20250703211949.9916-1-dev@aaront.org>
On Thu, Jul 03, 2025 at 09:19:49PM +0000, Aaron Thompson wrote:
> From: Aaron Thompson <dev@aaront.org>
>
> If CONFIG_DEBUG_FS is enabled, nouveau_drm_init() returns an error if it
> fails to create the "nouveau" directory in debugfs. One case where that
> will happen is when debugfs access is restricted by
> CONFIG_DEBUG_FS_ALLOW_NONE or by the boot parameter debugfs=off, which
> cause the debugfs APIs to return -EPERM.
>
> So just ignore errors from debugfs. Note that nouveau_debugfs_root may
> be an error now, but that is a standard pattern for debugfs. From
> include/linux/debugfs.h:
>
> "NOTE: it's expected that most callers should _ignore_ the errors
> returned by this function. Other debugfs functions handle the fact that
> the "dentry" passed to them could be an error and they don't crash in
> that case. Drivers should generally work fine even if debugfs fails to
> init anyway."
>
> Fixes: 97118a1816d2 ("drm/nouveau: create module debugfs root")
> Cc: stable@vger.kernel.org
> Signed-off-by: Aaron Thompson <dev@aaront.org>
Applied to drm-misc-fixes, thanks!
prev parent reply other threads:[~2025-07-03 22:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 21:19 [PATCH] drm/nouveau: Do not fail module init on debugfs errors Aaron Thompson
2025-07-03 21:26 ` Timur Tabi
2025-07-03 22:23 ` Danilo Krummrich [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=aGcCz5VU1lbi_ZxD@pollux \
--to=dakr@kernel.org \
--cc=airlied@gmail.com \
--cc=dev@aaront.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=ttabi@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox