From: Timur Tabi <ttabi@nvidia.com>
To: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
"dev@aaront.org" <dev@aaront.org>,
"lyude@redhat.com" <lyude@redhat.com>,
"dakr@kernel.org" <dakr@kernel.org>,
"airlied@gmail.com" <airlied@gmail.com>,
"simona@ffwll.ch" <simona@ffwll.ch>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/nouveau: Do not fail module init on debugfs errors
Date: Thu, 3 Jul 2025 21:26:07 +0000 [thread overview]
Message-ID: <d87acf2378c5c983982591ef9b9a3a636d707922.camel@nvidia.com> (raw)
In-Reply-To: <20250703211949.9916-1-dev@aaront.org>
On Thu, 2025-07-03 at 21:19 +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")
Oof, sorry about that. I should have noticed this behavior when I reviewed this patch.
Acked-by: Timur Tabi <ttabi@nvidia.com>
next prev parent reply other threads:[~2025-07-03 21:26 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 [this message]
2025-07-03 22:23 ` Danilo Krummrich
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=d87acf2378c5c983982591ef9b9a3a636d707922.camel@nvidia.com \
--to=ttabi@nvidia.com \
--cc=airlied@gmail.com \
--cc=dakr@kernel.org \
--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 \
/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