diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2020-04-28 14:55:12 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-05-01 16:34:57 -0400 |
commit | 03414a49ad5f3c56988c36d2070e402ffa17feaf (patch) | |
tree | 810a13efb69606650b481efaf4afec11b5abacad /security/selinux/ss/policydb.h | |
parent | 46619b44e431d85d64a8dfcb7166d0ae098544c8 (diff) | |
download | kernel_replicant_linux-03414a49ad5f3c56988c36d2070e402ffa17feaf.tar.gz kernel_replicant_linux-03414a49ad5f3c56988c36d2070e402ffa17feaf.tar.bz2 kernel_replicant_linux-03414a49ad5f3c56988c36d2070e402ffa17feaf.zip |
selinux: do not allocate hashtabs dynamically
It is simpler to allocate them statically in the corresponding
structure, avoiding unnecessary kmalloc() calls and pointer
dereferencing.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
[PM: manual merging required in policydb.c]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/policydb.h')
-rw-r--r-- | security/selinux/ss/policydb.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h index 35dc6aa7904d..9591c9587cb6 100644 --- a/security/selinux/ss/policydb.h +++ b/security/selinux/ss/policydb.h @@ -263,13 +263,13 @@ struct policydb { struct avtab te_avtab; /* role transitions */ - struct hashtab *role_tr; + struct hashtab role_tr; /* file transitions with the last path component */ /* quickly exclude lookups when parent ttype has no rules */ struct ebitmap filename_trans_ttypes; /* actual set of filename_trans rules */ - struct hashtab *filename_trans; + struct hashtab filename_trans; /* only used if policyvers < POLICYDB_VERSION_COMP_FTRANS */ u32 compat_filename_trans_count; @@ -294,7 +294,7 @@ struct policydb { struct genfs *genfs; /* range transitions table (range_trans_key -> mls_range) */ - struct hashtab *range_tr; + struct hashtab range_tr; /* type -> attribute reverse mapping */ struct ebitmap *type_attr_map_array; |