]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.16-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Aug 2025 14:06:46 +0000 (16:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Aug 2025 14:06:46 +0000 (16:06 +0200)
added patches:
debugfs-fix-mount-options-not-being-applied.patch
rust-faux-fix-c-header-link.patch

queue-6.16/debugfs-fix-mount-options-not-being-applied.patch [new file with mode: 0644]
queue-6.16/rust-faux-fix-c-header-link.patch [new file with mode: 0644]
queue-6.16/series

diff --git a/queue-6.16/debugfs-fix-mount-options-not-being-applied.patch b/queue-6.16/debugfs-fix-mount-options-not-being-applied.patch
new file mode 100644 (file)
index 0000000..a6bf64c
--- /dev/null
@@ -0,0 +1,79 @@
+From ba6cc29351b1fa0cb9adce91b88b9f3c3cbe9c46 Mon Sep 17 00:00:00 2001
+From: Charalampos Mitrodimas <charmitro@posteo.net>
+Date: Sat, 16 Aug 2025 14:14:37 +0000
+Subject: debugfs: fix mount options not being applied
+
+From: Charalampos Mitrodimas <charmitro@posteo.net>
+
+commit ba6cc29351b1fa0cb9adce91b88b9f3c3cbe9c46 upstream.
+
+Mount options (uid, gid, mode) are silently ignored when debugfs is
+mounted. This is a regression introduced during the conversion to the
+new mount API.
+
+When the mount API conversion was done, the parsed options were never
+applied to the superblock when it was reused. As a result, the mount
+options were ignored when debugfs was mounted.
+
+Fix this by following the same pattern as the tracefs fix in commit
+e4d32142d1de ("tracing: Fix tracefs mount options"). Call
+debugfs_reconfigure() in debugfs_get_tree() to apply the mount options
+to the superblock after it has been created or reused.
+
+As an example, with the bug the "mode" mount option is ignored:
+
+  $ mount -o mode=0666 -t debugfs debugfs /tmp/debugfs_test
+  $ mount | grep debugfs_test
+  debugfs on /tmp/debugfs_test type debugfs (rw,relatime)
+  $ ls -ld /tmp/debugfs_test
+  drwx------ 25 root root 0 Aug  4 14:16 /tmp/debugfs_test
+
+With the fix applied, it works as expected:
+
+  $ mount -o mode=0666 -t debugfs debugfs /tmp/debugfs_test
+  $ mount | grep debugfs_test
+  debugfs on /tmp/debugfs_test type debugfs (rw,relatime,mode=666)
+  $ ls -ld /tmp/debugfs_test
+  drw-rw-rw- 37 root root 0 Aug  2 17:28 /tmp/debugfs_test
+
+Fixes: a20971c18752 ("vfs: Convert debugfs to use the new mount API")
+Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220406
+Cc: stable <stable@kernel.org>
+Reviewed-by: Eric Sandeen <sandeen@redhat.com>
+Signed-off-by: Charalampos Mitrodimas <charmitro@posteo.net>
+Link: https://lore.kernel.org/r/20250816-debugfs-mount-opts-v3-1-d271dad57b5b@posteo.net
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/debugfs/inode.c |   11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+--- a/fs/debugfs/inode.c
++++ b/fs/debugfs/inode.c
+@@ -183,6 +183,9 @@ static int debugfs_reconfigure(struct fs
+       struct debugfs_fs_info *sb_opts = sb->s_fs_info;
+       struct debugfs_fs_info *new_opts = fc->s_fs_info;
++      if (!new_opts)
++              return 0;
++
+       sync_filesystem(sb);
+       /* structure copy of new mount options to sb */
+@@ -282,10 +285,16 @@ static int debugfs_fill_super(struct sup
+ static int debugfs_get_tree(struct fs_context *fc)
+ {
++      int err;
++
+       if (!(debugfs_allow & DEBUGFS_ALLOW_API))
+               return -EPERM;
+-      return get_tree_single(fc, debugfs_fill_super);
++      err = get_tree_single(fc, debugfs_fill_super);
++      if (err)
++              return err;
++
++      return debugfs_reconfigure(fc);
+ }
+ static void debugfs_free_fc(struct fs_context *fc)
diff --git a/queue-6.16/rust-faux-fix-c-header-link.patch b/queue-6.16/rust-faux-fix-c-header-link.patch
new file mode 100644 (file)
index 0000000..dfb4b6b
--- /dev/null
@@ -0,0 +1,56 @@
+From a5ba9ad417254c49ecf06ac5ab36ec4b12ee133f Mon Sep 17 00:00:00 2001
+From: Miguel Ojeda <ojeda@kernel.org>
+Date: Mon, 4 Aug 2025 19:13:11 +0200
+Subject: rust: faux: fix C header link
+
+From: Miguel Ojeda <ojeda@kernel.org>
+
+commit a5ba9ad417254c49ecf06ac5ab36ec4b12ee133f upstream.
+
+Starting with Rust 1.91.0 (expected 2025-10-30), `rustdoc` has improved
+some false negatives around intra-doc links [1], and it found a broken
+intra-doc link we currently have:
+
+    error: unresolved link to `include/linux/device/faux.h`
+     --> rust/kernel/faux.rs:7:17
+      |
+    7 | //! C header: [`include/linux/device/faux.h`]
+      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `include/linux/device/faux.h` in scope
+      |
+      = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+      = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
+      = help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`
+
+Our `srctree/` C header links are not intra-doc links, thus they need
+the link destination.
+
+Thus fix it.
+
+Cc: stable <stable@kernel.org>
+Link: https://github.com/rust-lang/rust/pull/132748 [1]
+Fixes: 78418f300d39 ("rust/kernel: Add faux device bindings")
+Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
+Reviewed-by: Benno Lossin <lossin@kernel.org>
+Reviewed-by: Alice Ryhl <aliceryhl@google.com>
+Link: https://lore.kernel.org/r/20250804171311.1186538-1-ojeda@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ rust/kernel/faux.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rust/kernel/faux.rs b/rust/kernel/faux.rs
+index 7a906099993f..7fe2dd197e37 100644
+--- a/rust/kernel/faux.rs
++++ b/rust/kernel/faux.rs
+@@ -4,7 +4,7 @@
+ //!
+ //! This module provides bindings for working with faux devices in kernel modules.
+ //!
+-//! C header: [`include/linux/device/faux.h`]
++//! C header: [`include/linux/device/faux.h`](srctree/include/linux/device/faux.h)
+ use crate::{bindings, device, error::code::*, prelude::*};
+ use core::ptr::{addr_of_mut, null, null_mut, NonNull};
+-- 
+2.50.1
+
index aaf91f41564cbb056feee0520108c73762bb7c11..379e4941d928d3e03281d2ec5584bf7578f725e4 100644 (file)
@@ -277,3 +277,5 @@ pci-rockchip-set-target-link-speed-to-5.0-gt-s-before-retraining.patch
 drm-amdgpu-fix-task-hang-from-failed-job-submission-during-process-kill.patch
 soc-qcom-mdt_loader-fix-error-return-values-in-mdt_header_valid.patch
 xfs-fix-frozen-file-system-assert-in-xfs_trans_alloc.patch
+rust-faux-fix-c-header-link.patch
+debugfs-fix-mount-options-not-being-applied.patch