summaryrefslogtreecommitdiff
path: root/net/netlabel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /net/netlabel
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/netlabel')
-rw-r--r--net/netlabel/netlabel_calipso.c2
-rw-r--r--net/netlabel/netlabel_cipso_v4.c8
-rw-r--r--net/netlabel/netlabel_domainhash.c4
-rw-r--r--net/netlabel/netlabel_mgmt.c10
-rw-r--r--net/netlabel/netlabel_unlabeled.c6
5 files changed, 15 insertions, 15 deletions
diff --git a/net/netlabel/netlabel_calipso.c b/net/netlabel/netlabel_calipso.c
index fae0bee5c065..e1efd888b4a2 100644
--- a/net/netlabel/netlabel_calipso.c
+++ b/net/netlabel/netlabel_calipso.c
@@ -95,7 +95,7 @@ static int netlbl_calipso_add_pass(struct genl_info *info,
int ret_val;
struct calipso_doi *doi_def = NULL;
- doi_def = kmalloc_obj(*doi_def, GFP_KERNEL);
+ doi_def = kmalloc_obj(*doi_def);
if (!doi_def)
return -ENOMEM;
doi_def->type = CALIPSO_MAP_PASS;
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c
index 526f3dc3e67a..b080e666523f 100644
--- a/net/netlabel/netlabel_cipso_v4.c
+++ b/net/netlabel/netlabel_cipso_v4.c
@@ -139,10 +139,10 @@ static int netlbl_cipsov4_add_std(struct genl_info *info,
NULL) != 0)
return -EINVAL;
- doi_def = kmalloc_obj(*doi_def, GFP_KERNEL);
+ doi_def = kmalloc_obj(*doi_def);
if (doi_def == NULL)
return -ENOMEM;
- doi_def->map.std = kzalloc_obj(*doi_def->map.std, GFP_KERNEL);
+ doi_def->map.std = kzalloc_obj(*doi_def->map.std);
if (doi_def->map.std == NULL) {
kfree(doi_def);
return -ENOMEM;
@@ -332,7 +332,7 @@ static int netlbl_cipsov4_add_pass(struct genl_info *info,
if (!info->attrs[NLBL_CIPSOV4_A_TAGLST])
return -EINVAL;
- doi_def = kmalloc_obj(*doi_def, GFP_KERNEL);
+ doi_def = kmalloc_obj(*doi_def);
if (doi_def == NULL)
return -ENOMEM;
doi_def->type = CIPSO_V4_MAP_PASS;
@@ -371,7 +371,7 @@ static int netlbl_cipsov4_add_local(struct genl_info *info,
if (!info->attrs[NLBL_CIPSOV4_A_TAGLST])
return -EINVAL;
- doi_def = kmalloc_obj(*doi_def, GFP_KERNEL);
+ doi_def = kmalloc_obj(*doi_def);
if (doi_def == NULL)
return -ENOMEM;
doi_def->type = CIPSO_V4_MAP_LOCAL;
diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c
index fc014849d6b3..3fe31648ba2d 100644
--- a/net/netlabel/netlabel_domainhash.c
+++ b/net/netlabel/netlabel_domainhash.c
@@ -367,11 +367,11 @@ int __init netlbl_domhsh_init(u32 size)
if (size == 0)
return -EINVAL;
- hsh_tbl = kmalloc_obj(*hsh_tbl, GFP_KERNEL);
+ hsh_tbl = kmalloc_obj(*hsh_tbl);
if (hsh_tbl == NULL)
return -ENOMEM;
hsh_tbl->size = 1 << size;
- hsh_tbl->tbl = kzalloc_objs(struct list_head, hsh_tbl->size, GFP_KERNEL);
+ hsh_tbl->tbl = kzalloc_objs(struct list_head, hsh_tbl->size);
if (hsh_tbl->tbl == NULL) {
kfree(hsh_tbl);
return -ENOMEM;
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c
index 13f45fbff824..3e89c3b3a1a4 100644
--- a/net/netlabel/netlabel_mgmt.c
+++ b/net/netlabel/netlabel_mgmt.c
@@ -84,7 +84,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info,
struct calipso_doi *calipso = NULL;
#endif
u32 tmp_val;
- struct netlbl_dom_map *entry = kzalloc_obj(*entry, GFP_KERNEL);
+ struct netlbl_dom_map *entry = kzalloc_obj(*entry);
if (!entry)
return -ENOMEM;
@@ -148,7 +148,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info,
struct in_addr *mask;
struct netlbl_domaddr4_map *map;
- addrmap = kzalloc_obj(*addrmap, GFP_KERNEL);
+ addrmap = kzalloc_obj(*addrmap);
if (addrmap == NULL) {
ret_val = -ENOMEM;
goto add_doi_put_def;
@@ -169,7 +169,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info,
addr = nla_data(info->attrs[NLBL_MGMT_A_IPV4ADDR]);
mask = nla_data(info->attrs[NLBL_MGMT_A_IPV4MASK]);
- map = kzalloc_obj(*map, GFP_KERNEL);
+ map = kzalloc_obj(*map);
if (map == NULL) {
ret_val = -ENOMEM;
goto add_free_addrmap;
@@ -195,7 +195,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info,
struct in6_addr *mask;
struct netlbl_domaddr6_map *map;
- addrmap = kzalloc_obj(*addrmap, GFP_KERNEL);
+ addrmap = kzalloc_obj(*addrmap);
if (addrmap == NULL) {
ret_val = -ENOMEM;
goto add_doi_put_def;
@@ -216,7 +216,7 @@ static int netlbl_mgmt_add_common(struct genl_info *info,
addr = nla_data(info->attrs[NLBL_MGMT_A_IPV6ADDR]);
mask = nla_data(info->attrs[NLBL_MGMT_A_IPV6MASK]);
- map = kzalloc_obj(*map, GFP_KERNEL);
+ map = kzalloc_obj(*map);
if (map == NULL) {
ret_val = -ENOMEM;
goto add_free_addrmap;
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c
index ab68324c08d9..ca7a9e2a3de7 100644
--- a/net/netlabel/netlabel_unlabeled.c
+++ b/net/netlabel/netlabel_unlabeled.c
@@ -1413,11 +1413,11 @@ int __init netlbl_unlabel_init(u32 size)
if (size == 0)
return -EINVAL;
- hsh_tbl = kmalloc_obj(*hsh_tbl, GFP_KERNEL);
+ hsh_tbl = kmalloc_obj(*hsh_tbl);
if (hsh_tbl == NULL)
return -ENOMEM;
hsh_tbl->size = 1 << size;
- hsh_tbl->tbl = kzalloc_objs(struct list_head, hsh_tbl->size, GFP_KERNEL);
+ hsh_tbl->tbl = kzalloc_objs(struct list_head, hsh_tbl->size);
if (hsh_tbl->tbl == NULL) {
kfree(hsh_tbl);
return -ENOMEM;
@@ -1532,7 +1532,7 @@ int __init netlbl_unlabel_defconf(void)
audit_info.loginuid = GLOBAL_ROOT_UID;
audit_info.sessionid = 0;
- entry = kzalloc_obj(*entry, GFP_KERNEL);
+ entry = kzalloc_obj(*entry);
if (entry == NULL)
return -ENOMEM;
entry->family = AF_UNSPEC;