Merge tag 'selinux-pr-20200210' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Feb 2020 00:51:35 +0000 (16:51 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Feb 2020 00:51:35 +0000 (16:51 -0800)
Pull SELinux fixes from Paul Moore:
 "Two small fixes: one fixes a locking problem in the recently merged
  label translation code, the other fixes an embarrassing 'binderfs' /
  'binder' filesystem name check"

* tag 'selinux-pr-20200210' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
  selinux: fix sidtab string cache locking
  selinux: fix typo in filesystem name

1  2 
security/selinux/hooks.c

diff --combined security/selinux/hooks.c
@@@ -698,7 -698,7 +698,7 @@@ static int selinux_set_mnt_opts(struct 
  
        if (!strcmp(sb->s_type->name, "debugfs") ||
            !strcmp(sb->s_type->name, "tracefs") ||
-           !strcmp(sb->s_type->name, "binderfs") ||
+           !strcmp(sb->s_type->name, "binder") ||
            !strcmp(sb->s_type->name, "pstore"))
                sbsec->flags |= SE_SBGENFS;
  
@@@ -2778,7 -2778,7 +2778,7 @@@ static int selinux_fs_context_dup(struc
        return 0;
  }
  
 -static const struct fs_parameter_spec selinux_param_specs[] = {
 +static const struct fs_parameter_spec selinux_fs_parameters[] = {
        fsparam_string(CONTEXT_STR,     Opt_context),
        fsparam_string(DEFCONTEXT_STR,  Opt_defcontext),
        fsparam_string(FSCONTEXT_STR,   Opt_fscontext),
        {}
  };
  
 -static const struct fs_parameter_description selinux_fs_parameters = {
 -      .name           = "SELinux",
 -      .specs          = selinux_param_specs,
 -};
 -
  static int selinux_fs_context_parse_param(struct fs_context *fc,
                                          struct fs_parameter *param)
  {
        struct fs_parse_result result;
        int opt, rc;
  
 -      opt = fs_parse(fc, &selinux_fs_parameters, param, &result);
 +      opt = fs_parse(fc, selinux_fs_parameters, param, &result);
        if (opt < 0)
                return opt;
  
@@@ -7188,7 -7193,7 +7188,7 @@@ static __init int selinux_init(void
        else
                pr_debug("SELinux:  Starting in permissive mode\n");
  
 -      fs_validate_description(&selinux_fs_parameters);
 +      fs_validate_description("selinux", selinux_fs_parameters);
  
        return 0;
  }