summaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 3745922c7132..0fe5ed8c33a0 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -981,8 +981,11 @@ static int selinux_sb_clone_mnt_opts(const struct super_block *oldsb,
981 BUG_ON(!(oldsbsec->flags & SE_SBINITIALIZED)); 981 BUG_ON(!(oldsbsec->flags & SE_SBINITIALIZED));
982 982
983 /* if fs is reusing a sb, make sure that the contexts match */ 983 /* if fs is reusing a sb, make sure that the contexts match */
984 if (newsbsec->flags & SE_SBINITIALIZED) 984 if (newsbsec->flags & SE_SBINITIALIZED) {
985 if ((kern_flags & SECURITY_LSM_NATIVE_LABELS) && !set_context)
986 *set_kern_flags |= SECURITY_LSM_NATIVE_LABELS;
985 return selinux_cmp_sb_context(oldsb, newsb); 987 return selinux_cmp_sb_context(oldsb, newsb);
988 }
986 989
987 mutex_lock(&newsbsec->lock); 990 mutex_lock(&newsbsec->lock);
988 991