Skip to contentSkip to conversation

debugfs: Fix default access mode config check

PATCH In review Aaron Thompson 2 participants 2 messages Dec 2, 2025 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 debugfs: Fix default access mode config check

This typo caused debugfs to always behave as if
CONFIG_DEBUG_FS_ALLOW_NONE was selected.

Fixes f278809475f6 ("debugfs: Remove broken no-mount mode")
---
 fs/debugfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/debugfs/inode.c +1 -1
index 0284b0256195..3b3713fcbbcb 100644
@@ -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

base-commit: f278809475f6835b56de78b28dc2cc0c7e2c20a4

Signature · 1 line
2.47.3
Tested-by on v1 1/1
#1 lore raw

Hi Aaron,

Thanks for your patch!

Quoted 5 lines · Aaron Thompson

This typo caused debugfs to always behave as if
CONFIG_DEBUG_FS_ALLOW_NONE was selected.

Fixes f278809475f6 ("debugfs: Remove broken no-mount mode")

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

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)

Quoted 2 lines

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.

fs/debugfs/inode.c line 41

Quoted 11 lines
fs/debugfs/inode.c +1 -1
@@ -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 -- [email protected]

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