[PATCH v2 0/3] debugfs: make debugfs_create_str() read-only
Yichong Chen <[email protected]> Thu, 6 Aug 2026 16:48:51 +0800
| Newsgroups | org.kernel.vger.linux-sound,dev.linux.lists.driver-core,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm |
|---|---|
| Message-ID | <[email protected]> |
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