aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <[email protected]>2025-01-10 08:58:14 +0100
committerGreg Kroah-Hartman <[email protected]>2025-01-10 09:41:53 +0100
commit67510d7e2e5f5bdc020bf9d759aa575cce48c8e1 (patch)
tree6ce9993409fd982bfaa76857daecafdc183e555f
parentb4aee757f1baf20fa2650fc23a7b0335696e005c (diff)
fs: debugfs: fix open proxy for unsafe files
In the previous commit referenced below, I had to split the short fops handling into different proxy fops. This necessitated knowing out-of-band whether or not the ops are short or full, when attempting to convert from fops to allocated fsdata. Unfortunately, I only converted full_proxy_open() which is used for the new full_proxy_open_regular() and full_proxy_open_short(), but forgot about the call in open_proxy_open(), used for debugfs_create_file_unsafe(). Fix that, it never has short fops. Fixes: f8f25893a477 ("fs: debugfs: differentiate short fops with proxy ops") Reported-by: Suresh Kumar Kurmi <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Reported-by: Venkat Rao Bagalkote <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Link: https://lore.kernel.org/r/20250110085826.cd74f3b7a36b.I430c79c82ec3f954c2ff9665753bf6ac9e63eef8@changeid Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--fs/debugfs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index bdb4f2ca0506..16e198a26339 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -280,7 +280,7 @@ static int open_proxy_open(struct inode *inode, struct file *filp)
const struct file_operations *real_fops = NULL;
int r;
- r = debugfs_file_get(dentry);
+ r = __debugfs_file_get(dentry, DBGFS_GET_REGULAR);
if (r)
return r == -EIO ? -ENOENT : r;