netfilter: x_tables: use GFP_KERNEL_ACCOUNT in match/target
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH v3 1/8 netfilter: x_tables: use GFP_KERNEL_ACCOUNT in match/target
GFP_KERNEL_ACCOUNT is preferred these days for memcg, replace GFP_KERNEL by GFP_KERNEL_ACCOUNT.
Use GFP_KERNEL_ACCOUNT for objects that are allocated in the xtables .check path. This includes template ct object with extensions such as helper and timeout.
---
v3: no changes
net/netfilter/nf_conntrack_ovs.c | 2 +- net/netfilter/xt_CT.c | 6 +++--- net/netfilter/xt_IDLETIMER.c | 8 ++++---- net/netfilter/xt_LED.c | 5 +++-- net/netfilter/xt_RATEEST.c | 2 +- net/netfilter/xt_TEE.c | 2 +- net/netfilter/xt_hashlimit.c | 4 ++-- net/netfilter/xt_limit.c | 2 +- net/netfilter/xt_quota.c | 2 +- net/netfilter/xt_recent.c | 3 ++- net/netfilter/xt_statistic.c | 2 +- net/netfilter/xt_string.c | 2 +- 12 files changed, 21 insertions(+), 19 deletions(-)
net/netfilter/nf_conntrack_ovs.c +1 -1
@@ -93,7 +93,7 @@ int nf_ct_add_helper(struct nf_conn *ct, const char *name, u8 family,if (!helper)return -EINVAL ; - help =nf_ct_helper_ext_add (ct,GFP_KERNEL ); + help =nf_ct_helper_ext_add (ct,GFP_KERNEL_ACCOUNT );if (!help) {nf_conntrack_helper_put (helper);return -ENOMEM ;
net/netfilter/xt_CT.c +3 -3
@@ -91,7 +91,7 @@ xt_ct_set_helper(struct nf_conn *ct, const char *helper_name,return -ENOENT ; } - help =nf_ct_helper_ext_add (ct,GFP_KERNEL ); + help =nf_ct_helper_ext_add (ct,GFP_KERNEL_ACCOUNT );if (help ==NULL ) {nf_conntrack_helper_put (helper);return -ENOMEM ;
@@ -182,7 +182,7 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par,if (info->flags &XT_CT_ZONE_MARK ) zone.flags |=NF_CT_FLAG_MARK ; - ct =nf_ct_tmpl_alloc (par->net, &zone,GFP_KERNEL ); + ct =nf_ct_tmpl_alloc (par->net, &zone,GFP_KERNEL_ACCOUNT );if (!ct) { ret = -ENOMEM ; goto err2;
@@ -190,7 +190,7 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par,if ((info->ct_events || info->exp_events) && !nf_ct_ecache_ext_add (ct, info->ct_events, info->exp_events, -GFP_KERNEL )) { +GFP_KERNEL_ACCOUNT )) { ret = -EINVAL ; goto err3; }
net/netfilter/xt_IDLETIMER.c +4 -4
@@ -147,7 +147,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) {int ret; - info->timer =kzalloc_obj (*info->timer); + info->timer =kzalloc_obj (*info->timer,GFP_KERNEL_ACCOUNT );if (!info->timer) { ret = -ENOMEM ; goto out;
@@ -158,7 +158,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) goto out_free_timer;sysfs_attr_init (&info->timer->attr.attr); - info->timer->attr.attr.name =kstrdup (info->label,GFP_KERNEL ); + info->timer->attr.attr.name =kstrdup (info->label,GFP_KERNEL_ACCOUNT );if (!info->timer->attr.attr.name) { ret = -ENOMEM ; goto out_free_timer;
@@ -196,7 +196,7 @@ static int idletimer_tg_create_v1(struct idletimer_tg_info_v1 *info) {int ret; - info->timer =kmalloc_obj (*info->timer); + info->timer =kmalloc_obj (*info->timer,GFP_KERNEL_ACCOUNT );if (!info->timer) { ret = -ENOMEM ; goto out;
@@ -207,7 +207,7 @@ static int idletimer_tg_create_v1(struct idletimer_tg_info_v1 *info) goto out_free_timer;sysfs_attr_init (&info->timer->attr.attr); - info->timer->attr.attr.name =kstrdup (info->label,GFP_KERNEL ); + info->timer->attr.attr.name =kstrdup (info->label,GFP_KERNEL_ACCOUNT );if (!info->timer->attr.attr.name) { ret = -ENOMEM ; goto out_free_timer;
net/netfilter/xt_LED.c +3 -2
@@ -111,11 +111,12 @@ static int led_tg_check(const struct xt_tgchk_param *par) } err = -ENOMEM ; - ledinternal = kzalloc_obj(struct xt_led_info_internal); + ledinternal = kzalloc_obj(struct xt_led_info_internal, +GFP_KERNEL_ACCOUNT );if (!ledinternal) goto exit_mutex_only; - ledinternal->trigger_id =kstrdup (ledinfo->id,GFP_KERNEL ); + ledinternal->trigger_id =kstrdup (ledinfo->id,GFP_KERNEL_ACCOUNT );if (!ledinternal->trigger_id) goto exit_internal_alloc;
net/netfilter/xt_RATEEST.c +1 -1
@@ -139,7 +139,7 @@ static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par) } ret = -ENOMEM ; - est =kzalloc_obj (*est); + est =kzalloc_obj (*est,GFP_KERNEL_ACCOUNT );if (!est) goto err1;
net/netfilter/xt_TEE.c +1 -1
@@ -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); + priv =kzalloc_obj (*priv,GFP_KERNEL_ACCOUNT );if (priv ==NULL )return -ENOMEM ;
net/netfilter/xt_hashlimit.c +2 -2
@@ -294,7 +294,7 @@ static int htable_create(struct net *net, struct hashlimit_cfg3 *cfg,if (size <16 ) size =16 ; } - hinfo =kvmalloc_flex (*hinfo, hash, size); + hinfo =kvmalloc_flex (*hinfo, hash, size,GFP_KERNEL_ACCOUNT );if (hinfo ==NULL )return -ENOMEM ; *out_hinfo = hinfo;
@@ -319,7 +319,7 @@ static int htable_create(struct net *net, struct hashlimit_cfg3 *cfg, hinfo->count =0 ; hinfo->family = family; hinfo->rnd_initialized = false; - hinfo->name =kstrdup (name,GFP_KERNEL ); + hinfo->name =kstrdup (name,GFP_KERNEL_ACCOUNT );if (!hinfo->name) {kvfree (hinfo);return -ENOMEM ;
net/netfilter/xt_limit.c +1 -1
@@ -115,7 +115,7 @@ static int limit_mt_check(const struct xt_mtchk_param *par)return -ERANGE ; } - priv =kmalloc_obj (*priv); + priv =kmalloc_obj (*priv,GFP_KERNEL_ACCOUNT );if (priv ==NULL )return -ENOMEM ;
net/netfilter/xt_quota.c +1 -1
@@ -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); + q->master =kmalloc_obj (*q->master,GFP_KERNEL_ACCOUNT );if (q->master ==NULL )return -ENOMEM ;
net/netfilter/xt_recent.c +2 -1
@@ -391,7 +391,8 @@ static int recent_mt_check(const struct xt_mtchk_param *par, goto out; } - t =kvzalloc_flex (*t, iphash, ip_list_hash_size); + t =kvzalloc_flex (*t, iphash, ip_list_hash_size, +GFP_KERNEL_ACCOUNT );if (t ==NULL ) { ret = -ENOMEM ; goto out;
net/netfilter/xt_statistic.c +1 -1
@@ -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); + info->master =kzalloc_obj (*info->master,GFP_KERNEL_ACCOUNT );if (info->master ==NULL )return -ENOMEM ;atomic_set (&info->master->count, info->u.nth.count);
net/netfilter/xt_string.c +1 -1
@@ -54,7 +54,7 @@ static int string_mt_check(const struct xt_mtchk_param *par)if (conf->u.v1.flags &XT_STRING_FLAG_IGNORECASE ) flags |=TS_IGNORECASE ; ts_conf =textsearch_prepare (conf->algo, conf->pattern, conf->patlen, -GFP_KERNEL , flags); +GFP_KERNEL_ACCOUNT , flags);if (IS_ERR (ts_conf))return PTR_ERR (ts_conf);
Signature · 1 line
2.47.3
Pablo Neira Ayuso
maintainerPATCH v3 2/8 netfilter: nfnetlink: use GFP_KERNEL_ACCOUNT
GFP_KERNEL_ACCOUNT is preferred these days for memcg, replace GFP_KERNEL by GFP_KERNEL_ACCOUNT.
Use GFP_KERNEL_ACCOUNT for objects that are created from nfnetlink subsystems.
---
v2: no changes
net/netfilter/nfnetlink_acct.c | 2 +- net/netfilter/nfnetlink_cthelper.c | 3 ++- net/netfilter/nfnetlink_cttimeout.c | 8 +++++--- net/netfilter/nfnetlink_osf.c | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-)
net/netfilter/nfnetlink_acct.c +1 -1
@@ -112,7 +112,7 @@ static int nfnl_acct_new(struct sk_buff *skb, const struct nfnl_info *info, size +=sizeof (u64); } - nfacct =kzalloc (sizeof (struct nf_acct ) + size,GFP_KERNEL ); + nfacct =kzalloc (sizeof (struct nf_acct ) + size,GFP_KERNEL_ACCOUNT );if (nfacct ==NULL )return -ENOMEM ;
net/netfilter/nfnetlink_cthelper.c +2 -1
@@ -335,7 +335,8 @@ static int nfnl_cthelper_update_policy_all(struct nlattr *tb[],struct nf_conntrack_expect_policy *policy;int i, ret =0 ; - new_policy =kmalloc_objs (*new_policy, helper->expect_class_max +1 ); + new_policy =kmalloc_objs (*new_policy, helper->expect_class_max +1 , +GFP_KERNEL_ACCOUNT );if (!new_policy)return -ENOMEM ;
net/netfilter/nfnetlink_cttimeout.c +5 -3
@@ -71,7 +71,8 @@ ctnl_timeout_parse_policy(void *timeout,struct nlattr **tb;int ret =0 ; - tb =kzalloc_objs (*tb, l4proto->ctnl_timeout.nlattr_max +1 ); + tb =kzalloc_objs (*tb, l4proto->ctnl_timeout.nlattr_max +1 , +GFP_KERNEL_ACCOUNT );if (!tb)return -ENOMEM ;
@@ -150,14 +151,15 @@ static int cttimeout_new_timeout(struct sk_buff *skb, goto err_proto_put; } - timeout =kzalloc (sizeof (*timeout),GFP_KERNEL ); + timeout =kzalloc (sizeof (*timeout),GFP_KERNEL_ACCOUNT );if (timeout ==NULL ) { ret = -ENOMEM ; goto err_proto_put; } timeout->timeout =kzalloc (sizeof (*timeout->timeout) + - l4proto->ctnl_timeout.obj_size,GFP_KERNEL ); + l4proto->ctnl_timeout.obj_size, +GFP_KERNEL_ACCOUNT );if (!timeout->timeout) { ret = -ENOMEM ; goto err;
net/netfilter/nfnetlink_osf.c +1 -1
@@ -325,7 +325,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); + kf = kmalloc_obj(struct nf_osf_finger, GFP_KERNEL_ACCOUNT);if (!kf)return -ENOMEM ;
Signature · 1 line
2.47.3
Pablo Neira Ayuso
maintainerPATCH v3 3/8 netfilter: nf_tables: use GFP_KERNEL_ACCOUNT
In reply to Pablo Neira AyusoGFP_KERNEL_ACCOUNT is preferred these days for memcg, replace GFP_KERNEL by GFP_KERNEL_ACCOUNT.
Just a few leftover in nft_ct and the pipapo set backend, including alloc_percpu() calls.
---
v3: use alloc_percpu_gfp() in pipapo.
net/netfilter/nft_ct.c | 5 +++-- net/netfilter/nft_set_pipapo.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-)
net/netfilter/nft_ct.c +3 -2
@@ -848,7 +848,8 @@ nft_ct_timeout_parse_policy(void *timeouts,struct nlattr **tb;int ret =0 ; - tb =kzalloc_objs (*tb, l4proto->ctnl_timeout.nlattr_max +1 ); + tb =kzalloc_objs (*tb, l4proto->ctnl_timeout.nlattr_max +1 , +GFP_KERNEL_ACCOUNT );if (!tb)return -ENOMEM ;
@@ -934,7 +935,7 @@ static int nft_ct_timeout_obj_init(const struct nft_ctx *ctx, } timeout =kzalloc (sizeof (struct nf_ct_timeout ) + - l4proto->ctnl_timeout.obj_size,GFP_KERNEL ); + l4proto->ctnl_timeout.obj_size,GFP_KERNEL_ACCOUNT );if (timeout ==NULL ) { ret = -ENOMEM ; goto err_proto_put;
net/netfilter/nft_set_pipapo.c +3 -3
@@ -1441,7 +1441,7 @@ static struct nft_pipapo_match *pipapo_clone(struct nft_pipapo_match *old) new->field_count = old->field_count; new->bsize_max = old->bsize_max; - new->scratch =alloc_percpu (*new->scratch); + new->scratch =alloc_percpu_gfp (*new->scratch,GFP_KERNEL_ACCOUNT );if (!new->scratch) goto out_scratch;
@@ -2298,14 +2298,14 @@ static int nft_pipapo_init(const struct nft_set *set,if (field_count >NFT_PIPAPO_MAX_FIELDS )return -EINVAL ; - m =kmalloc_flex (*m, f, field_count); + m =kmalloc_flex (*m, f, field_count,GFP_KERNEL_ACCOUNT );if (!m)return -ENOMEM ; m->field_count = field_count; m->bsize_max =0 ; - m->scratch = alloc_percpu(struct nft_pipapo_scratch *); + m->scratch = alloc_percpu_gfp(struct nft_pipapo_scratch *, GFP_KERNEL_ACCOUNT);if (!m->scratch) { err = -ENOMEM ; goto out_scratch;
Signature · 1 line
2.47.3
Pablo Neira Ayuso
maintainerPATCH v3 4/8 netfilter: synproxy: use GFP_KERNEL_ACCOUNT
In reply to Pablo Neira AyusoGFP_KERNEL_ACCOUNT is preferred these days for memcg, replace GFP_KERNEL by GFP_KERNEL_ACCOUNT.
Allocate template conntrack via GFP_KERNEL_ACCOUNT.
---
v3: no changes
net/netfilter/nf_synproxy_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_synproxy_core.c +1 -1
@@ -336,7 +336,7 @@ static int __net_init synproxy_net_init(struct net *net)struct nf_conn *ct;int err = -ENOMEM ; - ct =nf_ct_tmpl_alloc (net, &nf_ct_zone_dflt,GFP_KERNEL ); + ct =nf_ct_tmpl_alloc (net, &nf_ct_zone_dflt,GFP_KERNEL_ACCOUNT );if (!ct) goto err1;
Signature · 1 line
2.47.3
Pablo Neira Ayuso
maintainerPATCH v3 5/8 netfilter: sysctl: use GFP_KERNEL_ACCOUNT
In reply to Pablo Neira AyusoGFP_KERNEL_ACCOUNT is preferred these days for memcg, replace GFP_KERNEL by GFP_KERNEL_ACCOUNT.
Allocate per-netns sysctl via GFP_KERNEL_ACCOUNT.
---
v3: no changes
net/netfilter/nf_conntrack_standalone.c | 2 +- net/netfilter/nf_hooks_lwtunnel.c | 2 +- net/netfilter/nf_log.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
net/netfilter/nf_conntrack_standalone.c +1 -1
@@ -1009,7 +1009,7 @@ static int nf_conntrack_standalone_init_sysctl(struct net *net)BUILD_BUG_ON (ARRAY_SIZE (nf_ct_sysctl_table) !=NF_SYSCTL_CT_LAST_SYSCTL ); table =kmemdup (nf_ct_sysctl_table,sizeof (nf_ct_sysctl_table), -GFP_KERNEL ); +GFP_KERNEL_ACCOUNT );if (!table)return -ENOMEM ;
net/netfilter/nf_hooks_lwtunnel.c +1 -1
@@ -73,7 +73,7 @@ static int __net_init nf_lwtunnel_net_init(struct net *net)if (!net_eq (net, &init_net)) { table =kmemdup (nf_lwtunnel_sysctl_table,sizeof (nf_lwtunnel_sysctl_table), -GFP_KERNEL ); +GFP_KERNEL_ACCOUNT );if (!table) goto err_alloc; }
net/netfilter/nf_log.c +1 -1
@@ -493,7 +493,7 @@ static int netfilter_log_sysctl_init(struct net *net)if (!net_eq (net, &init_net)) { table =kmemdup (nf_log_sysctl_table,sizeof (nf_log_sysctl_table), -GFP_KERNEL ); +GFP_KERNEL_ACCOUNT );if (!table) goto err_alloc; }else {
Signature · 1 line
2.47.3
Pablo Neira Ayuso
maintainerPATCH v3 6/8 netfilter: nat: use GFP_KERNEL_ACCOUNT
In reply to Pablo Neira AyusoGFP_KERNEL_ACCOUNT is preferred these days for memcg, replace GFP_KERNEL by GFP_KERNEL_ACCOUNT.
Allocate the internal nat hook via GFP_KERNEL_ACCOUNT.
---
v3: no changes
net/netfilter/nf_nat_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/netfilter/nf_nat_core.c +3 -2
@@ -1204,14 +1204,15 @@ int nf_nat_register_fn(struct net *net, u8 pf, const struct nf_hook_ops *ops,if (!nat_proto_net->nat_hook_ops) {WARN_ON (nat_proto_net->users !=0 ); - nat_ops =kmemdup_array (orig_nat_ops, ops_count,sizeof (*orig_nat_ops),GFP_KERNEL ); + nat_ops =kmemdup_array (orig_nat_ops, ops_count,sizeof (*orig_nat_ops), +GFP_KERNEL_ACCOUNT );if (!nat_ops) {mutex_unlock (&nf_nat_proto_mutex);return -ENOMEM ; }for (i =0 ; i < ops_count; i++) { - priv =kzalloc_obj (*priv); + priv =kzalloc_obj (*priv,GFP_KERNEL_ACCOUNT );if (priv) { nat_ops[i].priv = priv;continue ;
Signature · 1 line
2.47.3
Pablo Neira Ayuso
maintainerPATCH v3 7/8 netfilter: conncount: use GFP_KERNEL_ACCOUNT
In reply to Pablo Neira AyusoGFP_KERNEL_ACCOUNT is preferred these days for memcg, replace GFP_KERNEL by GFP_KERNEL_ACCOUNT.
Allocate the internal nf_conncount datastructure via GFP_KERNEL_ACCOUNT.
---
v3: no changes
net/netfilter/nf_conncount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_conncount.c +1 -1
@@ -692,7 +692,7 @@ struct nf_conncount_data *nf_conncount_init(struct net *net, unsigned int keylen keylen == 0)return ERR_PTR (-EINVAL ); - data =kvzalloc_obj (*data); + data =kvzalloc_obj (*data,GFP_KERNEL_ACCOUNT );if (!data)return ERR_PTR (-ENOMEM );
Signature · 1 line
2.47.3
Pablo Neira Ayuso
maintainerPATCH v3 8/8 netfilter: ipset: use GFP_KERNEL_ACCOUNT
In reply to Pablo Neira AyusoGFP_KERNEL_ACCOUNT is preferred these days for memcg, replace GFP_KERNEL by GFP_KERNEL_ACCOUNT.
Use GFP_KERNEL_ACCOUNT to allocate internal datastructures in ipset.
---
v3: no changes
net/netfilter/ipset/ip_set_bitmap_ip.c | 2 +- net/netfilter/ipset/ip_set_bitmap_ipmac.c | 2 +- net/netfilter/ipset/ip_set_bitmap_port.c | 2 +- net/netfilter/ipset/ip_set_core.c | 7 ++++--- net/netfilter/ipset/ip_set_hash_gen.h | 6 +++--- net/netfilter/ipset/ip_set_list_set.c | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-)
net/netfilter/ipset/ip_set_bitmap_ip.c +1 -1
@@ -217,7 +217,7 @@ init_map_ip(struct ip_set *set, struct bitmap_ip *map, u32 first_ip, u32 last_ip, u32 elements, u32 hosts, u8 netmask) { - map->members = bitmap_zalloc(elements, GFP_KERNEL | __GFP_NOWARN); + map->members = bitmap_zalloc(elements, GFP_KERNEL_ACCOUNT | __GFP_NOWARN);if (!map->members)return false; map->first_ip = first_ip;
net/netfilter/ipset/ip_set_bitmap_ipmac.c +1 -1
@@ -300,7 +300,7 @@ static bool init_map_ipmac(struct ip_set *set, struct bitmap_ipmac *map, u32 first_ip, u32 last_ip, u32 elements) { - map->members = bitmap_zalloc(elements, GFP_KERNEL | __GFP_NOWARN); + map->members = bitmap_zalloc(elements, GFP_KERNEL_ACCOUNT | __GFP_NOWARN);if (!map->members)return false; map->first_ip = first_ip;
net/netfilter/ipset/ip_set_bitmap_port.c +1 -1
@@ -231,7 +231,7 @@ static bool init_map_port(struct ip_set *set, struct bitmap_port *map, u16 first_port, u16 last_port) { - map->members = bitmap_zalloc(map->elements, GFP_KERNEL | __GFP_NOWARN); + map->members = bitmap_zalloc(map->elements, GFP_KERNEL_ACCOUNT | __GFP_NOWARN);if (!map->members)return false; map->first_port = first_port;
net/netfilter/ipset/ip_set_core.c +4 -3
@@ -1085,7 +1085,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); + set =kzalloc_obj (*set,GFP_KERNEL_ACCOUNT );if (!set)return -ENOMEM ;spin_lock_init (&set->lock);
@@ -1143,7 +1143,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); + list = kvzalloc_objs(struct ip_set *, i, GFP_KERNEL_ACCOUNT);if (!list) goto cleanup;/* nfnl mutex is held, both lists are valid */
@@ -2397,7 +2397,8 @@ 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); + list = kvzalloc_objs(struct ip_set *, inst->ip_set_max, +GFP_KERNEL_ACCOUNT );if (!list)return -ENOMEM ; inst->is_deleted = false;
net/netfilter/ipset/ip_set_hash_gen.h +3 -3
@@ -768,7 +768,7 @@ mtype_resize(struct ip_set *set, bool retried)int ret;#ifdef IP_SET_HASH_WITH_NETS - tmp =kmalloc (dsize,GFP_KERNEL ); + tmp =kmalloc (dsize,GFP_KERNEL_ACCOUNT );if (!tmp)return -ENOMEM ;#endif
@@ -1754,7 +1754,7 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set, sizeof(struct IPSET_TOKEN(HTYPE, 6)) : sizeof(struct IPSET_TOKEN(HTYPE, 4));#endif - h =kzalloc (hsize,GFP_KERNEL ); + h =kzalloc (hsize,GFP_KERNEL_ACCOUNT );if (!h)return -ENOMEM ;
@@ -1774,7 +1774,7 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set, goto free_t;#ifdef IP_SET_HASH_WITH_NETS for (i =0 ; i <IPSET_NET_COUNT ; i++) { - nets =kzalloc_obj (*nets); + nets =kzalloc_obj (*nets,GFP_KERNEL_ACCOUNT );if (!nets) {while (i >0 )kfree (rcu_dereference_raw (h->rnets[--i]));
net/netfilter/ipset/ip_set_list_set.c +1 -1
@@ -600,7 +600,7 @@ init_list_set(struct net *net, struct ip_set *set, u32 size) {struct list_set *map; - map =kzalloc_obj (*map); + map =kzalloc_obj (*map,GFP_KERNEL_ACCOUNT );if (!map)return false;
Signature · 1 line
2.47.3