Skip to content

Commit 056d331

Browse files
jtlaytonbrauner
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent c6640d4 commit 056d331

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/namespace.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5036,6 +5036,10 @@ static int statmount_mnt_opts(struct kstatmount *s, struct seq_file *seq)
50365036
if (sb->s_op->show_options) {
50375037
size_t start = seq->count;
50385038

5039+
err = security_sb_show_options(seq, sb);
5040+
if (err)
5041+
return err;
5042+
50395043
err = sb->s_op->show_options(seq, mnt->mnt_root);
50405044
if (err)
50415045
return err;

0 commit comments

Comments
 (0)