Re: [PATCH] debugfs: Fix default access mode config check
From: Geert Uytterhoeven
Date: Tue Dec 02 2025 - 07:09:44 EST
Hi Aaron,
Thanks for your patch!
On Tue, 2 Dec 2025 at 08:19, Aaron Thompson <dev@xxxxxxxxxx> wrote:
> This typo caused debugfs to always behave as if
> CONFIG_DEBUG_FS_ALLOW_NONE was selected.
>
> Fixes: f278809475f6 ("debugfs: Remove broken no-mount mode")
> Reported-by: Mark Brown <broonie@xxxxxxxxxx>
Please run scripts/checkpatch.pl on your patches.
For this patch, it reports:
WARNING: Reported-by: should be immediately followed by Closes:
with a URL to the report
Closes: https://lore.kernel.org/8c2a2753-145e-4de5-84fe-9a900af6a2ee@xxxxxxxxxxxxx
For the broken patch, it would have reported:
WARNING: IS_ENABLED(DEBUG_FS_ALLOW_ALL) is normally used as
IS_ENABLED(CONFIG_DEBUG_FS_ALLOW_ALL)
> Tested-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
> Signed-off-by: Aaron Thompson <dev@xxxxxxxxxx>
Thank you, this fixes:
1. "pinctrl core: failed to create debugfs directory for <foo>.pinctrl",
2. Failed to mount debugfs,
3. Systemd dropping in emergency mode on Debian systems.
Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> --- a/fs/debugfs/inode.c
> +++ b/fs/debugfs/inode.c
> @@ -35,7 +35,7 @@
> static struct vfsmount *debugfs_mount;
> static int debugfs_mount_count;
> static bool debugfs_registered;
> -static bool debugfs_enabled __ro_after_init = IS_ENABLED(DEBUG_FS_ALLOW_ALL);
> +static bool debugfs_enabled __ro_after_init = IS_ENABLED(CONFIG_DEBUG_FS_ALLOW_ALL);
>
> /*
> * Don't allow access attributes to be changed whilst the kernel is locked down
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds