summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:06:51 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commit323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (patch)
tree515dca34daa8d18ec26c2c3da3096c6c23955c95 /security
parentbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (diff)
Convert 'alloc_flex' family to use the new default GFP_KERNEL argument
This is the exact same thing as the 'alloc_obj()' version, only much smaller because there are a lot fewer users of the *alloc_flex() interface. As with alloc_obj() version, this was done entirely with mindless brute force, using the same script, except using 'flex' in the pattern rather than 'objs*'. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/ima/ima_modsig.c2
-rw-r--r--security/integrity/ima/ima_policy.c2
-rw-r--r--security/landlock/domain.c2
-rw-r--r--security/loadpin/loadpin.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/security/integrity/ima/ima_modsig.c b/security/integrity/ima/ima_modsig.c
index daeeddae3878..9aa92fd35a03 100644
--- a/security/integrity/ima/ima_modsig.c
+++ b/security/integrity/ima/ima_modsig.c
@@ -65,7 +65,7 @@ int ima_read_modsig(enum ima_hooks func, const void *buf, loff_t buf_len,
buf_len -= sig_len + sizeof(*sig);
/* Allocate sig_len additional bytes to hold the raw PKCS#7 data. */
- hdr = kzalloc_flex(*hdr, raw_pkcs7, sig_len, GFP_KERNEL);
+ hdr = kzalloc_flex(*hdr, raw_pkcs7, sig_len);
if (!hdr)
return -ENOMEM;
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index 420642f96cab..7d63764feda2 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -342,7 +342,7 @@ static struct ima_rule_opt_list *ima_alloc_rule_opt_list(const substring_t *src)
return ERR_PTR(-EINVAL);
}
- opt_list = kzalloc_flex(*opt_list, items, count, GFP_KERNEL);
+ opt_list = kzalloc_flex(*opt_list, items, count);
if (!opt_list) {
kfree(src_copy);
return ERR_PTR(-ENOMEM);
diff --git a/security/landlock/domain.c b/security/landlock/domain.c
index 29a0f9789eee..f5b78d4766cd 100644
--- a/security/landlock/domain.c
+++ b/security/landlock/domain.c
@@ -95,7 +95,7 @@ static struct landlock_details *get_current_details(void)
* caller.
*/
details =
- kzalloc_flex(*details, exe_path, path_size, GFP_KERNEL);
+ kzalloc_flex(*details, exe_path, path_size);
if (!details)
return ERR_PTR(-ENOMEM);
diff --git a/security/loadpin/loadpin.c b/security/loadpin/loadpin.c
index 62b9ee7caefb..f71861f98e1a 100644
--- a/security/loadpin/loadpin.c
+++ b/security/loadpin/loadpin.c
@@ -327,7 +327,7 @@ static int read_trusted_verity_root_digests(unsigned int fd)
len /= 2;
- trd = kzalloc_flex(*trd, data, len, GFP_KERNEL);
+ trd = kzalloc_flex(*trd, data, len);
if (!trd) {
rc = -ENOMEM;
goto err;