diff options
author | Jeff Layton <jlayton@kernel.org> | 2024-11-15 10:35:53 -0500 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-01-09 16:58:51 +0100 |
commit | 056d33137bf9364456ee70aa265ccbb948daee49 (patch) | |
tree | 353732425ba8a8dc46ae7e78f42a4aa49e78d74c /fs/namespace.c | |
parent | c6640d46dc5a31ee7363545530836c10b9ddb9de (diff) |
fs: prepend statmount.mnt_opts string with security_sb_mnt_opts()
Currently these mount options aren't accessible via statmount().
The read handler for /proc/#/mountinfo calls security_sb_show_options()
to emit the security options after emitting superblock flag options, but
before calling sb->s_op->show_options.
Have statmount_mnt_opts() call security_sb_show_options() before
calling ->show_options.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20241115-statmount-v2-2-cd29aeff9cbb@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 847fa8443e8a..1af8da8e1e97 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -5036,6 +5036,10 @@ static int statmount_mnt_opts(struct kstatmount *s, struct seq_file *seq) if (sb->s_op->show_options) { size_t start = seq->count; + err = security_sb_show_options(seq, sb); + if (err) + return err; + err = sb->s_op->show_options(seq, mnt->mnt_root); if (err) return err; |