[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d87acf2378c5c983982591ef9b9a3a636d707922.camel@nvidia.com>
Date: Thu, 3 Jul 2025 21:26:07 +0000
From: Timur Tabi <ttabi@...dia.com>
To: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
"dev@...ont.org" <dev@...ont.org>, "lyude@...hat.com" <lyude@...hat.com>,
"dakr@...nel.org" <dakr@...nel.org>, "airlied@...il.com" <airlied@...il.com>,
"simona@...ll.ch" <simona@...ll.ch>
CC: "stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/nouveau: Do not fail module init on debugfs errors
On Thu, 2025-07-03 at 21:19 +0000, Aaron Thompson wrote:
> From: Aaron Thompson <dev@...ont.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@...dia.com>
Powered by blists - more mailing lists