[PATCH] statmount: fix security option retrieval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix the inverted check for security_sb_show_options().

Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Link: https://lore.kernel.org/r/c8eaa647-5d67-49b6-9401-705afcb7e4d7@stanley.mountain
Fixes: aefff51e1c29 ("statmount: retrieve security mount options")
Cc: Cc: <stable@xxxxxxxxxxxxxxx> # mainline only
Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
---
 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index 6b0a17487d0f..eb34a5160f64 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -5116,7 +5116,7 @@ static int statmount_opt_sec_array(struct kstatmount *s, struct seq_file *seq)
 	buf_start = seq->buf + start;
 
 	err = security_sb_show_options(seq, sb);
-	if (!err)
+	if (err)
 		return err;
 
 	if (unlikely(seq_has_overflowed(seq)))
-- 
2.45.2





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux