Skip to content

Commit 45439a8

Browse files
jtlaytongregkh
authored andcommitted
fs: prepend statmount.mnt_opts string with security_sb_mnt_opts()
commit 056d331 upstream. 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]> Stable-dep-of: 5eb9871 ("fs: fix adding security options to statmount.mnt_opt") Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bdea9e6 commit 45439a8

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
@@ -5025,6 +5025,10 @@ static int statmount_mnt_opts(struct kstatmount *s, struct seq_file *seq)
50255025
if (sb->s_op->show_options) {
50265026
size_t start = seq->count;
50275027

5028+
err = security_sb_show_options(seq, sb);
5029+
if (err)
5030+
return err;
5031+
50285032
err = sb->s_op->show_options(seq, mnt->mnt_root);
50295033
if (err)
50305034
return err;

0 commit comments

Comments
 (0)