diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-06-14 16:02:04 +0300 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2023-07-09 17:31:19 -0700 |
commit | afad53575a938ceb557227ecfeb0dda59d668d4e (patch) | |
tree | d01e5606c3a4c6a918f84cf27eddc37e72262ba2 /security/apparmor | |
parent | 180cf257998c5f136f76b8899ef6ec57b410680b (diff) |
apparmor: use passed in gfp flags in aa_alloc_null()
These allocations should use the gfp flags from the caller instead of
GFP_KERNEL. But from what I can see, all the callers pass in GFP_KERNEL
so this does not affect runtime.
Fixes: e31dd6e412f7 ("apparmor: fix: kzalloc perms tables for shared dfas")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor')
-rw-r--r-- | security/apparmor/policy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c index b38f7b2a5e1d..715fe1b66d12 100644 --- a/security/apparmor/policy.c +++ b/security/apparmor/policy.c @@ -589,12 +589,12 @@ struct aa_profile *aa_alloc_null(struct aa_profile *parent, const char *name, profile->label.flags |= FLAG_NULL; rules = list_first_entry(&profile->rules, typeof(*rules), list); rules->file.dfa = aa_get_dfa(nulldfa); - rules->file.perms = kcalloc(2, sizeof(struct aa_perms), GFP_KERNEL); + rules->file.perms = kcalloc(2, sizeof(struct aa_perms), gfp); if (!rules->file.perms) goto fail; rules->file.size = 2; rules->policy.dfa = aa_get_dfa(nulldfa); - rules->policy.perms = kcalloc(2, sizeof(struct aa_perms), GFP_KERNEL); + rules->policy.perms = kcalloc(2, sizeof(struct aa_perms), gfp); if (!rules->policy.perms) goto fail; rules->policy.size = 2; |