[PATCH v2 0/3] debugfs: make debugfs_create_str() read-only
From: Yichong Chen
Date: Thu Aug 06 2026 - 04:57:13 EST
debugfs_create_str() currently supports writable files through a generic
string replacement helper. Concurrent writers can race in that helper.
Instead of adding more locking to the generic debugfs string code, convert
the existing writable in-tree users to local file operations first, then make
debugfs_create_str() read-only and refuse modes with write permission bits.
Changes since v1:
- Follow Greg's suggestion to avoid adding locking to the generic
debugfs_create_str() write path.
- Convert the existing writable in-tree users to local file operations.
- Make debugfs_create_str() read-only and refuse writable modes.
- Split the change into a 3-patch series.
Yichong Chen (3):
interconnect: debugfs: replace writable string helper
soundwire: debugfs: replace writable string helper
debugfs: make debugfs_create_str() read-only
drivers/interconnect/debugfs-client.c | 75 ++++++++++++++++++++-----
drivers/soundwire/debugfs.c | 56 ++++++++++++++++--
fs/debugfs/file.c | 81 ++++-----------------------
3 files changed, 124 insertions(+), 88 deletions(-)
--
2.51.0