diff options
Diffstat (limited to 'security/selinux/ss/avtab.h')
-rw-r--r-- | security/selinux/ss/avtab.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/security/selinux/ss/avtab.h b/security/selinux/ss/avtab.h index 63ce2f9e441d..adb451cd44f9 100644 --- a/security/selinux/ss/avtab.h +++ b/security/selinux/ss/avtab.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #ifndef _SS_AVTAB_H_ | 23 | #ifndef _SS_AVTAB_H_ |
24 | #define _SS_AVTAB_H_ | 24 | #define _SS_AVTAB_H_ |
25 | 25 | ||
26 | #include <linux/flex_array.h> | ||
27 | |||
26 | struct avtab_key { | 28 | struct avtab_key { |
27 | u16 source_type; /* source type */ | 29 | u16 source_type; /* source type */ |
28 | u16 target_type; /* target type */ | 30 | u16 target_type; /* target type */ |
@@ -51,10 +53,10 @@ struct avtab_node { | |||
51 | }; | 53 | }; |
52 | 54 | ||
53 | struct avtab { | 55 | struct avtab { |
54 | struct avtab_node **htable; | 56 | struct flex_array *htable; |
55 | u32 nel; /* number of elements */ | 57 | u32 nel; /* number of elements */ |
56 | u32 nslot; /* number of hash slots */ | 58 | u32 nslot; /* number of hash slots */ |
57 | u16 mask; /* mask to compute hash func */ | 59 | u32 mask; /* mask to compute hash func */ |
58 | 60 | ||
59 | }; | 61 | }; |
60 | 62 | ||
@@ -84,7 +86,7 @@ struct avtab_node *avtab_search_node_next(struct avtab_node *node, int specified | |||
84 | void avtab_cache_init(void); | 86 | void avtab_cache_init(void); |
85 | void avtab_cache_destroy(void); | 87 | void avtab_cache_destroy(void); |
86 | 88 | ||
87 | #define MAX_AVTAB_HASH_BITS 11 | 89 | #define MAX_AVTAB_HASH_BITS 16 |
88 | #define MAX_AVTAB_HASH_BUCKETS (1 << MAX_AVTAB_HASH_BITS) | 90 | #define MAX_AVTAB_HASH_BUCKETS (1 << MAX_AVTAB_HASH_BITS) |
89 | 91 | ||
90 | #endif /* _SS_AVTAB_H_ */ | 92 | #endif /* _SS_AVTAB_H_ */ |