summaryrefslogtreecommitdiff
path: root/net/netfilter
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/netfilter
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/netfilter')
-rw-r--r--net/netfilter/ipset/ip_set_core.c6
-rw-r--r--net/netfilter/ipset/ip_set_list_set.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c8
-rw-r--r--net/netfilter/ipvs/ip_vs_dh.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_est.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_lblc.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_lblcr.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_mh.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_proto.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_sh.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_sync.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_wrr.c2
-rw-r--r--net/netfilter/nf_conncount.c2
-rw-r--r--net/netfilter/nf_conntrack_core.c2
-rw-r--r--net/netfilter/nf_conntrack_netlink.c2
-rw-r--r--net/netfilter/nf_flow_table_offload.c2
-rw-r--r--net/netfilter/nf_nat_core.c2
-rw-r--r--net/netfilter/nf_tables_api.c6
-rw-r--r--net/netfilter/nf_tables_offload.c4
-rw-r--r--net/netfilter/nfnetlink.c2
-rw-r--r--net/netfilter/nfnetlink_acct.c2
-rw-r--r--net/netfilter/nfnetlink_cthelper.c2
-rw-r--r--net/netfilter/nfnetlink_cttimeout.c2
-rw-r--r--net/netfilter/nfnetlink_hook.c2
-rw-r--r--net/netfilter/nfnetlink_osf.c2
-rw-r--r--net/netfilter/nft_ct.c2
-rw-r--r--net/netfilter/x_tables.c6
-rw-r--r--net/netfilter/xt_IDLETIMER.c4
-rw-r--r--net/netfilter/xt_LED.c2
-rw-r--r--net/netfilter/xt_RATEEST.c2
-rw-r--r--net/netfilter/xt_TEE.c2
-rw-r--r--net/netfilter/xt_limit.c2
-rw-r--r--net/netfilter/xt_quota.c2
-rw-r--r--net/netfilter/xt_statistic.c2
34 files changed, 47 insertions, 47 deletions
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
index c3beef6155b6..a2fe711cb5e3 100644
--- a/net/netfilter/ipset/ip_set_core.c
+++ b/net/netfilter/ipset/ip_set_core.c
@@ -1077,7 +1077,7 @@ static int ip_set_create(struct sk_buff *skb, const struct nfnl_info *info,
/* First, and without any locks, allocate and initialize
* a normal base set structure.
*/
- set = kzalloc_obj(*set, GFP_KERNEL);
+ set = kzalloc_obj(*set);
if (!set)
return -ENOMEM;
spin_lock_init(&set->lock);
@@ -1135,7 +1135,7 @@ static int ip_set_create(struct sk_buff *skb, const struct nfnl_info *info,
/* Wraparound */
goto cleanup;
- list = kvzalloc_objs(struct ip_set *, i, GFP_KERNEL);
+ list = kvzalloc_objs(struct ip_set *, i);
if (!list)
goto cleanup;
/* nfnl mutex is held, both lists are valid */
@@ -2377,7 +2377,7 @@ ip_set_net_init(struct net *net)
if (inst->ip_set_max >= IPSET_INVALID_ID)
inst->ip_set_max = IPSET_INVALID_ID - 1;
- list = kvzalloc_objs(struct ip_set *, inst->ip_set_max, GFP_KERNEL);
+ list = kvzalloc_objs(struct ip_set *, inst->ip_set_max);
if (!list)
return -ENOMEM;
inst->is_deleted = false;
diff --git a/net/netfilter/ipset/ip_set_list_set.c b/net/netfilter/ipset/ip_set_list_set.c
index 39165c014bd9..98b91b34c314 100644
--- a/net/netfilter/ipset/ip_set_list_set.c
+++ b/net/netfilter/ipset/ip_set_list_set.c
@@ -598,7 +598,7 @@ init_list_set(struct net *net, struct ip_set *set, u32 size)
{
struct list_set *map;
- map = kzalloc_obj(*map, GFP_KERNEL);
+ map = kzalloc_obj(*map);
if (!map)
return false;
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index d38867c52180..35642de2a0fe 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -938,7 +938,7 @@ int ip_vs_stats_init_alloc(struct ip_vs_stats *s)
struct ip_vs_stats *ip_vs_stats_alloc(void)
{
- struct ip_vs_stats *s = kzalloc_obj(*s, GFP_KERNEL);
+ struct ip_vs_stats *s = kzalloc_obj(*s);
if (s && ip_vs_stats_init_alloc(s) >= 0)
return s;
@@ -1079,7 +1079,7 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest)
return -EINVAL;
}
- dest = kzalloc_obj(struct ip_vs_dest, GFP_KERNEL);
+ dest = kzalloc_obj(struct ip_vs_dest);
if (dest == NULL)
return -ENOMEM;
@@ -1421,7 +1421,7 @@ ip_vs_add_service(struct netns_ipvs *ipvs, struct ip_vs_service_user_kern *u,
ret_hooks = ret;
}
- svc = kzalloc_obj(struct ip_vs_service, GFP_KERNEL);
+ svc = kzalloc_obj(struct ip_vs_service);
if (svc == NULL) {
IP_VS_DBG(1, "%s(): no memory\n", __func__);
ret = -ENOMEM;
@@ -4439,7 +4439,7 @@ int __net_init ip_vs_control_net_init(struct netns_ipvs *ipvs)
INIT_DELAYED_WORK(&ipvs->est_reload_work, est_reload_work_handler);
/* procfs stats */
- ipvs->tot_stats = kzalloc_obj(*ipvs->tot_stats, GFP_KERNEL);
+ ipvs->tot_stats = kzalloc_obj(*ipvs->tot_stats);
if (!ipvs->tot_stats)
goto out;
if (ip_vs_stats_init_alloc(&ipvs->tot_stats->s) < 0)
diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c
index ac1d6f5bfe8a..e1f62f6b25e2 100644
--- a/net/netfilter/ipvs/ip_vs_dh.c
+++ b/net/netfilter/ipvs/ip_vs_dh.c
@@ -153,7 +153,7 @@ static int ip_vs_dh_init_svc(struct ip_vs_service *svc)
struct ip_vs_dh_state *s;
/* allocate the DH table for this service */
- s = kzalloc_obj(struct ip_vs_dh_state, GFP_KERNEL);
+ s = kzalloc_obj(struct ip_vs_dh_state);
if (s == NULL)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c
index 06999a17519b..b17de33314da 100644
--- a/net/netfilter/ipvs/ip_vs_est.c
+++ b/net/netfilter/ipvs/ip_vs_est.c
@@ -325,7 +325,7 @@ static int ip_vs_est_add_kthread(struct netns_ipvs *ipvs)
id = i;
}
- kd = kzalloc_obj(*kd, GFP_KERNEL);
+ kd = kzalloc_obj(*kd);
if (!kd)
goto out;
kd->ipvs = ipvs;
@@ -443,7 +443,7 @@ add_est:
td = rcu_dereference_protected(kd->ticks[row], 1);
if (!td) {
- td = kzalloc_obj(*td, GFP_KERNEL);
+ td = kzalloc_obj(*td);
if (!td) {
ret = -ENOMEM;
goto out;
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
index 36d91153712c..15ccb2b2fa1f 100644
--- a/net/netfilter/ipvs/ip_vs_lblc.c
+++ b/net/netfilter/ipvs/ip_vs_lblc.c
@@ -347,7 +347,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
/*
* Allocate the ip_vs_lblc_table for this service
*/
- tbl = kmalloc_obj(*tbl, GFP_KERNEL);
+ tbl = kmalloc_obj(*tbl);
if (tbl == NULL)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c
index eba6600decbe..c90ea897c3f7 100644
--- a/net/netfilter/ipvs/ip_vs_lblcr.c
+++ b/net/netfilter/ipvs/ip_vs_lblcr.c
@@ -510,7 +510,7 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc)
/*
* Allocate the ip_vs_lblcr_table for this service
*/
- tbl = kmalloc_obj(*tbl, GFP_KERNEL);
+ tbl = kmalloc_obj(*tbl);
if (tbl == NULL)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
index 7f5be86bab4d..c029ff6b3eb2 100644
--- a/net/netfilter/ipvs/ip_vs_mh.c
+++ b/net/netfilter/ipvs/ip_vs_mh.c
@@ -382,7 +382,7 @@ static int ip_vs_mh_init_svc(struct ip_vs_service *svc)
struct ip_vs_mh_state *s;
/* Allocate the MH table for this service */
- s = kzalloc_obj(*s, GFP_KERNEL);
+ s = kzalloc_obj(*s);
if (!s)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index a62c1e8fc1da..0046aed1fb38 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -66,7 +66,7 @@ register_ip_vs_proto_netns(struct netns_ipvs *ipvs, struct ip_vs_protocol *pp)
{
unsigned int hash = IP_VS_PROTO_HASH(pp->protocol);
struct ip_vs_proto_data *pd =
- kzalloc_obj(struct ip_vs_proto_data, GFP_KERNEL);
+ kzalloc_obj(struct ip_vs_proto_data);
if (!pd)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c
index a4616433b445..cd67066e3b26 100644
--- a/net/netfilter/ipvs/ip_vs_sh.c
+++ b/net/netfilter/ipvs/ip_vs_sh.c
@@ -229,7 +229,7 @@ static int ip_vs_sh_init_svc(struct ip_vs_service *svc)
struct ip_vs_sh_state *s;
/* allocate the SH table for this service */
- s = kzalloc_obj(struct ip_vs_sh_state, GFP_KERNEL);
+ s = kzalloc_obj(struct ip_vs_sh_state);
if (s == NULL)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index f83732777228..b2ba3befbd55 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -1827,7 +1827,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c,
struct ipvs_master_sync_state *ms;
result = -ENOMEM;
- ipvs->ms = kzalloc_objs(ipvs->ms[0], count, GFP_KERNEL);
+ ipvs->ms = kzalloc_objs(ipvs->ms[0], count);
if (!ipvs->ms)
goto out;
ms = ipvs->ms;
@@ -1841,7 +1841,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c,
}
}
result = -ENOMEM;
- ti = kzalloc_objs(struct ip_vs_sync_thread_data, count, GFP_KERNEL);
+ ti = kzalloc_objs(struct ip_vs_sync_thread_data, count);
if (!ti)
goto out;
diff --git a/net/netfilter/ipvs/ip_vs_wrr.c b/net/netfilter/ipvs/ip_vs_wrr.c
index 58c65af9830a..2dcff1040da5 100644
--- a/net/netfilter/ipvs/ip_vs_wrr.c
+++ b/net/netfilter/ipvs/ip_vs_wrr.c
@@ -109,7 +109,7 @@ static int ip_vs_wrr_init_svc(struct ip_vs_service *svc)
/*
* Allocate the mark variable for WRR scheduling
*/
- mark = kmalloc_obj(struct ip_vs_wrr_mark, GFP_KERNEL);
+ mark = kmalloc_obj(struct ip_vs_wrr_mark);
if (mark == NULL)
return -ENOMEM;
diff --git a/net/netfilter/nf_conncount.c b/net/netfilter/nf_conncount.c
index 520781335fc8..00eed5b4d1b1 100644
--- a/net/netfilter/nf_conncount.c
+++ b/net/netfilter/nf_conncount.c
@@ -632,7 +632,7 @@ struct nf_conncount_data *nf_conncount_init(struct net *net, unsigned int keylen
net_get_random_once(&conncount_rnd, sizeof(conncount_rnd));
- data = kmalloc_obj(*data, GFP_KERNEL);
+ data = kmalloc_obj(*data);
if (!data)
return ERR_PTR(-ENOMEM);
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 42da155ab028..27ce5fda8993 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -2535,7 +2535,7 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls)
if (nr_slots > (INT_MAX / sizeof(struct hlist_nulls_head)))
return NULL;
- hash = kvzalloc_objs(struct hlist_nulls_head, nr_slots, GFP_KERNEL);
+ hash = kvzalloc_objs(struct hlist_nulls_head, nr_slots);
if (hash && nulls)
for (i = 0; i < nr_slots; i++)
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index cd1ab584fb2f..c9d725fc2d71 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -999,7 +999,7 @@ ctnetlink_alloc_filter(const struct nlattr * const cda[], u8 family)
return ERR_PTR(-EOPNOTSUPP);
#endif
- filter = kzalloc_obj(*filter, GFP_KERNEL);
+ filter = kzalloc_obj(*filter);
if (filter == NULL)
return ERR_PTR(-ENOMEM);
diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c
index c95a18ca178b..9b677e116487 100644
--- a/net/netfilter/nf_flow_table_offload.c
+++ b/net/netfilter/nf_flow_table_offload.c
@@ -741,7 +741,7 @@ nf_flow_offload_rule_alloc(struct net *net,
struct nf_flow_rule *flow_rule;
int err = -ENOMEM;
- flow_rule = kzalloc_obj(*flow_rule, GFP_KERNEL);
+ flow_rule = kzalloc_obj(*flow_rule);
if (!flow_rule)
goto err_flow;
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
index b4053e5ee07f..3b5434e4ec9c 100644
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -1213,7 +1213,7 @@ int nf_nat_register_fn(struct net *net, u8 pf, const struct nf_hook_ops *ops,
}
for (i = 0; i < ops_count; i++) {
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (priv) {
nat_ops[i].priv = priv;
continue;
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 6044f1ec6953..06bd4d6eefeb 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1104,7 +1104,7 @@ __printf(2, 3) int nft_request_module(struct net *net, const char *fmt,
}
}
- req = kmalloc_obj(*req, GFP_KERNEL);
+ req = kmalloc_obj(*req);
if (!req)
return -ENOMEM;
@@ -8075,7 +8075,7 @@ static struct nft_object *nft_obj_init(const struct nft_ctx *ctx,
struct nft_object *obj;
int err = -ENOMEM;
- tb = kmalloc_objs(*tb, type->maxattr + 1, GFP_KERNEL);
+ tb = kmalloc_objs(*tb, type->maxattr + 1);
if (!tb)
goto err1;
@@ -10688,7 +10688,7 @@ static int nf_tables_commit_audit_alloc(struct list_head *adl,
if (adp->table == table)
return 0;
}
- adp = kzalloc_obj(*adp, GFP_KERNEL);
+ adp = kzalloc_obj(*adp);
if (!adp)
return -ENOMEM;
adp->table = table;
diff --git a/net/netfilter/nf_tables_offload.c b/net/netfilter/nf_tables_offload.c
index 42f11cb0c0f5..9101b1703b52 100644
--- a/net/netfilter/nf_tables_offload.c
+++ b/net/netfilter/nf_tables_offload.c
@@ -11,7 +11,7 @@ static struct nft_flow_rule *nft_flow_rule_alloc(int num_actions)
{
struct nft_flow_rule *flow;
- flow = kzalloc_obj(struct nft_flow_rule, GFP_KERNEL);
+ flow = kzalloc_obj(struct nft_flow_rule);
if (!flow)
return NULL;
@@ -111,7 +111,7 @@ struct nft_flow_rule *nft_flow_rule_create(struct net *net,
expr = nft_expr_first(rule);
- ctx = kzalloc_obj(struct nft_offload_ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(struct nft_offload_ctx);
if (!ctx) {
err = -ENOMEM;
goto err_out;
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index 39c3d54de9f6..e62a0dea24ea 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -325,7 +325,7 @@ static int nfnl_err_add(struct list_head *list, struct nlmsghdr *nlh, int err,
{
struct nfnl_err *nfnl_err;
- nfnl_err = kmalloc_obj(struct nfnl_err, GFP_KERNEL);
+ nfnl_err = kmalloc_obj(struct nfnl_err);
if (nfnl_err == NULL)
return -ENOMEM;
diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c
index bd3d960a1adb..2bfaa773d82f 100644
--- a/net/netfilter/nfnetlink_acct.c
+++ b/net/netfilter/nfnetlink_acct.c
@@ -260,7 +260,7 @@ static int nfnl_acct_start(struct netlink_callback *cb)
if (!tb[NFACCT_FILTER_MASK] || !tb[NFACCT_FILTER_VALUE])
return -EINVAL;
- filter = kzalloc_obj(struct nfacct_filter, GFP_KERNEL);
+ filter = kzalloc_obj(struct nfacct_filter);
if (!filter)
return -ENOMEM;
diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c
index 1a3d333e45dd..5efffc52d981 100644
--- a/net/netfilter/nfnetlink_cthelper.c
+++ b/net/netfilter/nfnetlink_cthelper.c
@@ -227,7 +227,7 @@ nfnl_cthelper_create(const struct nlattr * const tb[],
if (!tb[NFCTH_TUPLE] || !tb[NFCTH_POLICY] || !tb[NFCTH_PRIV_DATA_LEN])
return -EINVAL;
- nfcth = kzalloc_obj(*nfcth, GFP_KERNEL);
+ nfcth = kzalloc_obj(*nfcth);
if (nfcth == NULL)
return -ENOMEM;
helper = &nfcth->helper;
diff --git a/net/netfilter/nfnetlink_cttimeout.c b/net/netfilter/nfnetlink_cttimeout.c
index 6b91f9d3161a..fd8652aa7e88 100644
--- a/net/netfilter/nfnetlink_cttimeout.c
+++ b/net/netfilter/nfnetlink_cttimeout.c
@@ -74,7 +74,7 @@ ctnl_timeout_parse_policy(void *timeout,
struct nlattr **tb;
int ret = 0;
- tb = kzalloc_objs(*tb, l4proto->ctnl_timeout.nlattr_max + 1, GFP_KERNEL);
+ tb = kzalloc_objs(*tb, l4proto->ctnl_timeout.nlattr_max + 1);
if (!tb)
return -ENOMEM;
diff --git a/net/netfilter/nfnetlink_hook.c b/net/netfilter/nfnetlink_hook.c
index c2a572d86853..531706982859 100644
--- a/net/netfilter/nfnetlink_hook.c
+++ b/net/netfilter/nfnetlink_hook.c
@@ -408,7 +408,7 @@ static int nfnl_hook_dump_start(struct netlink_callback *cb)
if (head && IS_ERR(head))
return PTR_ERR(head);
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return -ENOMEM;
diff --git a/net/netfilter/nfnetlink_osf.c b/net/netfilter/nfnetlink_osf.c
index 1ba43e562a5e..94e3eac5743a 100644
--- a/net/netfilter/nfnetlink_osf.c
+++ b/net/netfilter/nfnetlink_osf.c
@@ -323,7 +323,7 @@ static int nfnl_osf_add_callback(struct sk_buff *skb,
!memchr(f->version, 0, MAXGENRELEN))
return -EINVAL;
- kf = kmalloc_obj(struct nf_osf_finger, GFP_KERNEL);
+ kf = kmalloc_obj(struct nf_osf_finger);
if (!kf)
return -ENOMEM;
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index 8d7f6c8e8aad..47d3ef109a99 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -894,7 +894,7 @@ nft_ct_timeout_parse_policy(void *timeouts,
struct nlattr **tb;
int ret = 0;
- tb = kzalloc_objs(*tb, l4proto->ctnl_timeout.nlattr_max + 1, GFP_KERNEL);
+ tb = kzalloc_objs(*tb, l4proto->ctnl_timeout.nlattr_max + 1);
if (!tb)
return -ENOMEM;
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index f5d720c9ee32..e594b3b7ad82 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -1742,7 +1742,7 @@ xt_hook_ops_alloc(const struct xt_table *table, nf_hookfn *fn)
if (!num_hooks)
return ERR_PTR(-EINVAL);
- ops = kzalloc_objs(*ops, num_hooks, GFP_KERNEL);
+ ops = kzalloc_objs(*ops, num_hooks);
if (ops == NULL)
return ERR_PTR(-ENOMEM);
@@ -1775,7 +1775,7 @@ int xt_register_template(const struct xt_table *table,
}
ret = -ENOMEM;
- t = kzalloc_obj(*t, GFP_KERNEL);
+ t = kzalloc_obj(*t);
if (!t)
goto out_unlock;
@@ -1993,7 +1993,7 @@ static int __init xt_init(void)
}
}
- xt = kzalloc_objs(struct xt_af, NFPROTO_NUMPROTO, GFP_KERNEL);
+ xt = kzalloc_objs(struct xt_af, NFPROTO_NUMPROTO);
if (!xt)
return -ENOMEM;
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c
index 746abeee6775..5d93e225d0f8 100644
--- a/net/netfilter/xt_IDLETIMER.c
+++ b/net/netfilter/xt_IDLETIMER.c
@@ -135,7 +135,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info)
{
int ret;
- info->timer = kzalloc_obj(*info->timer, GFP_KERNEL);
+ info->timer = kzalloc_obj(*info->timer);
if (!info->timer) {
ret = -ENOMEM;
goto out;
@@ -184,7 +184,7 @@ static int idletimer_tg_create_v1(struct idletimer_tg_info_v1 *info)
{
int ret;
- info->timer = kmalloc_obj(*info->timer, GFP_KERNEL);
+ info->timer = kmalloc_obj(*info->timer);
if (!info->timer) {
ret = -ENOMEM;
goto out;
diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c
index 6b21810e1b97..caaaf4d2c584 100644
--- a/net/netfilter/xt_LED.c
+++ b/net/netfilter/xt_LED.c
@@ -111,7 +111,7 @@ static int led_tg_check(const struct xt_tgchk_param *par)
}
err = -ENOMEM;
- ledinternal = kzalloc_obj(struct xt_led_info_internal, GFP_KERNEL);
+ ledinternal = kzalloc_obj(struct xt_led_info_internal);
if (!ledinternal)
goto exit_mutex_only;
diff --git a/net/netfilter/xt_RATEEST.c b/net/netfilter/xt_RATEEST.c
index d75b1e101a5b..91270d467ffd 100644
--- a/net/netfilter/xt_RATEEST.c
+++ b/net/netfilter/xt_RATEEST.c
@@ -139,7 +139,7 @@ static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par)
}
ret = -ENOMEM;
- est = kzalloc_obj(*est, GFP_KERNEL);
+ est = kzalloc_obj(*est);
if (!est)
goto err1;
diff --git a/net/netfilter/xt_TEE.c b/net/netfilter/xt_TEE.c
index c6044ea31d16..5d34ceb893ed 100644
--- a/net/netfilter/xt_TEE.c
+++ b/net/netfilter/xt_TEE.c
@@ -106,7 +106,7 @@ static int tee_tg_check(const struct xt_tgchk_param *par)
if (info->oif[sizeof(info->oif)-1] != '\0')
return -EINVAL;
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (priv == NULL)
return -ENOMEM;
diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c
index 203f8bb28132..87d74da14c0b 100644
--- a/net/netfilter/xt_limit.c
+++ b/net/netfilter/xt_limit.c
@@ -115,7 +115,7 @@ static int limit_mt_check(const struct xt_mtchk_param *par)
return -ERANGE;
}
- priv = kmalloc_obj(*priv, GFP_KERNEL);
+ priv = kmalloc_obj(*priv);
if (priv == NULL)
return -ENOMEM;
diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c
index 7952a4ef4c51..b05c5c8dac78 100644
--- a/net/netfilter/xt_quota.c
+++ b/net/netfilter/xt_quota.c
@@ -50,7 +50,7 @@ static int quota_mt_check(const struct xt_mtchk_param *par)
if (q->flags & ~XT_QUOTA_MASK)
return -EINVAL;
- q->master = kmalloc_obj(*q->master, GFP_KERNEL);
+ q->master = kmalloc_obj(*q->master);
if (q->master == NULL)
return -ENOMEM;
diff --git a/net/netfilter/xt_statistic.c b/net/netfilter/xt_statistic.c
index e80ddc317ca5..334e09771abf 100644
--- a/net/netfilter/xt_statistic.c
+++ b/net/netfilter/xt_statistic.c
@@ -58,7 +58,7 @@ static int statistic_mt_check(const struct xt_mtchk_param *par)
info->flags & ~XT_STATISTIC_MASK)
return -EINVAL;
- info->master = kzalloc_obj(*info->master, GFP_KERNEL);
+ info->master = kzalloc_obj(*info->master);
if (info->master == NULL)
return -ENOMEM;
atomic_set(&info->master->count, info->u.nth.count);