diff options
Diffstat (limited to 'security/selinux/ss/conditional.c')
-rw-r--r-- | security/selinux/ss/conditional.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index 655fe1c6cc69..c3f845cbcd48 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c | |||
@@ -193,6 +193,7 @@ int cond_index_bool(void *key, void *datum, void *datap) | |||
193 | { | 193 | { |
194 | struct policydb *p; | 194 | struct policydb *p; |
195 | struct cond_bool_datum *booldatum; | 195 | struct cond_bool_datum *booldatum; |
196 | struct flex_array *fa; | ||
196 | 197 | ||
197 | booldatum = datum; | 198 | booldatum = datum; |
198 | p = datap; | 199 | p = datap; |
@@ -200,7 +201,10 @@ int cond_index_bool(void *key, void *datum, void *datap) | |||
200 | if (!booldatum->value || booldatum->value > p->p_bools.nprim) | 201 | if (!booldatum->value || booldatum->value > p->p_bools.nprim) |
201 | return -EINVAL; | 202 | return -EINVAL; |
202 | 203 | ||
203 | p->p_bool_val_to_name[booldatum->value - 1] = key; | 204 | fa = p->sym_val_to_name[SYM_BOOLS]; |
205 | if (flex_array_put_ptr(fa, booldatum->value - 1, key, | ||
206 | GFP_KERNEL | __GFP_ZERO)) | ||
207 | BUG(); | ||
204 | p->bool_val_to_struct[booldatum->value - 1] = booldatum; | 208 | p->bool_val_to_struct[booldatum->value - 1] = booldatum; |
205 | 209 | ||
206 | return 0; | 210 | return 0; |